pax_global_header00006660000000000000000000000064125772000640014515gustar00rootroot0000000000000052 comment=58272d11bac49c8d020444d89ef53e71cf51a140 iptux-0.6.3/000077500000000000000000000000001257720006400126745ustar00rootroot00000000000000iptux-0.6.3/.gitignore000066400000000000000000000017501257720006400146670ustar00rootroot00000000000000# # NOTE! Don't add files that are generated in specific # subdirectories here. Add them in the ".gitignore" file # in that subdirectory instead. # # NOTE! Please use 'git ls-files -i --exclude-standard' # command after changing this file, to see if there are # any tracked files which get ignored after the change. # # Normal rules # .* *.o *.o.* *.a *.s *.ko *.so *.so.dbg *.mod.c *.i *.lst *.symtypes *.order modules.builtin *.elf *.bin *.gz *.bz2 *.lzma *.gcno # # Top-level generic files # /tags /TAGS /linux /vmlinux /vmlinuz /System.map /Module.markers /Module.symvers # # git files that we don't want to ignore even it they are dot-files # !.gitignore !.mailmap # # Generated include files # include/config include/linux/version.h include/generated # stgit generated dirs patches-* # cscope files cscope.* ncscope.* # gnu global files GPATH GRTAGS GSYMS GTAGS *.orig *~ \#*# Makefile config.h config.log config.status po/POTFILES src/iptux stamp-h1 autom4te.cache *.gmo po/Makefile.in iptux-0.6.3/.travis.yml000066400000000000000000000002211257720006400150000ustar00rootroot00000000000000language: cpp compiler: - gcc - clang script: autoreconf -i && ./configure && make install: sudo apt-get install libgtk2.0-dev libgconf2-dev iptux-0.6.3/ChangeLog000077500000000000000000000062241257720006400144550ustar00rootroot000000000000002011-12-24 改进了如下问题 -资源文件不存在是程序异常退出 -广播网段过大时,启动时界面不响应 -正在文件传输过程中终止文件传输时程序异常退出 -在没有任务栏的系统中点主窗口的X按钮后主窗口无法调出 -与windows版,adroid版信鸽发送单个文件时对方不能接收 -往adroid版信鸽发多个文件时对方不能接收 -改进了接收文件夹时的协议,与原版飞鸽一致,接收与发送时加入了文件时间信息(飞鸽类软件都有这一项),改正了接收文件夹时的一个逻辑错误(这个错误会导致文件已经接收完,但是还不断去tcp连接中读取数据,这样界面上一直会显示没有正常结束) 2010-06-19 - issue 71: iptux crash when shared dir does not exist. 2009-10-07 -在alick的帮助下完成翻译修正工作 2009-10-02 -完成底层代码的大量整改工作 2009-07-11 -图片资源改由GTK+帮助管理 2009-04-16 -底层代码的少量修改 2009-03-09 -修正选择自定义声音路径无效的问题 2009-02-26 -文件已存在时自动重命令文件以防覆盖 -加入音量控制功能 2009-02-21 -实现面板上的来消息提示 2009-02-20 -完成反安装程序 2009-02-19 -更人性化的文件保存路径选择 2009-02-18 -完美处理文件的拖拽操作 2009-02-17 -加入声音提示、日志记录功能 2009-02-16 -完成声音模块 -添加从群发界面直接跳入单好友聊天模式功能 -为共享文件设置密码保护 2009-02-14 -取消背景变更 -更换程序logo 2009-02-13 -修正strpbrk()函数引发的编译出错 2009-02-09 -修正自定义头像不能被正确显示的错误 -实现文字与图像同步传输 2009-02-07 -取消友元类编码方法 -为某些命令增设标志位,用于识别更多种情形 -分离部分底层与界面代码 2009-01-14 -修正初始化丢失引发的段错误 -采用一套可选择的方案解决运行效率太低的问题 2009-01-12 -重新调整底层架构 2009-01-09 -解决缓冲区太小引发的诸多问题 2008-12-26 -使用Enter键直接发送消息 -组功能支持 2008-12-25 -新增网段描述表功能 2008-12-23 -新增64位大文件处理能力 2008-12-22 -增加排序功能 -调整配置文件存放路径 2008-12-21 -端口绑定出错则程序强制退出 2008-12-19 -修正端口绑定出错 2008-12-15 -最后一次处理图片传输,但是无法完成 -取消IP段自动添加功能 2008-12-13 -更新协议文档 2008-12-12 -完成形象照片传输,同时也为传输图片打好了基础 2008-12-11 -搞定个性签名 2008-12-10 -修正接收UDP数据时,缓冲区可能存在的溢出问题 -利用兼容特性减少网络数据发送量 -重制界面 2008-12-07 -更多错误提示 -修正遍历文件链表时释放内存出错 2008-12-05 -新增搜索功能 2008-12-03 -修正文件发送、接收兼容问题 2008-11-25 -修正接收文件时发生的内存泄漏 2008-11-22 -改善配置文件的读取与存储 -修正群发消息时的内存泄漏 2008-11-19 -修正与飞秋(FeiQ)之间的兼容性 -修正自动回复失效的错误 -修正不能接收文件的错误 iptux-0.6.3/Makefile.am000077500000000000000000000003251257720006400147330ustar00rootroot00000000000000# not a GNU package. You can remove this line, if # have all needed files, that a GNU package needs AUTOMAKE_OPTIONS = foreign 1.4 SUBDIRS = src desktop pixmaps po sound EXTRA_DIST = Makefile.cvs protocol style iptux-0.6.3/Makefile.cvs000077500000000000000000000001371257720006400151320ustar00rootroot00000000000000default: all all: aclocal autoheader automake --add-missing autoconf glib-gettextize -f iptux-0.6.3/Makefile.in000066400000000000000000000621251257720006400147470ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ ChangeLog compile config.guess config.sub depcomp install-sh \ ltmain.sh missing mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 GZIP_ENV = --best DIST_TARGETS = dist-bzip2 dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_CFLAGS = @GST_CFLAGS@ GST_LIBS = @GST_LIBS@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ desktopdir = @desktopdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logodir = @logodir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pixmapsdir = @pixmapsdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sounddir = @sounddir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # not a GNU package. You can remove this line, if # have all needed files, that a GNU package needs AUTOMAKE_OPTIONS = foreign 1.4 SUBDIRS = src desktop pixmaps po sound EXTRA_DIST = Makefile.cvs protocol style all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile config.h installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-hdr \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am .PRECIOUS: Makefile # 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: iptux-0.6.3/NEWS.md000066400000000000000000000057421257720006400140020ustar00rootroot00000000000000# 0.6.3 (2015-09-29) * [#44] Add "Keywords" entries to iptux.desktop, etc. * [#43] Remove deprecated "Encoding" in group "Desktop Entry". * [#45] Upgrade to GStreamer from 0.10 to 1.0. # 0.6.2 (2014-02-06) * [#26] iptux --version should work without DISPLAY env. * [#28] code.google.com -> github.com # 0.6.1 (2013-12-14) * [#20] fix compile problem under MacOSX 10.9 # 0.6.0 (2013-06-05) * [#8] fix autoreconf warning * [#6] add travis support * [#4] buildable under Linux * [#1] buildable under Mac OSX # OLD RELEASES * 2012-2-29 把文件接收发送界面放在了聊天窗口内,根据此功能需要底层数据结构作相应改动 * 2011-12-24 改进了如下问题 1.资源文件不存在是程序异常退出 2.广播网段过大时,启动时界面不响应 3.正在文件传输过程中终止文件传输时程序异常退出 4.在没有任务栏的系统中点主窗口的X按钮后主窗口无法调出 5.与windows版,adroid版信鸽发送单个文件时对方不能接收 6.往adroid版信鸽发多个文件时对方不能接收 7.改进了接收文件夹时的协议,与原版飞鸽一致,接收与发送时加入了文件时间信息(飞鸽类软件都有这一项),改正了接收文件夹时的一个逻辑错误(这个错误会导致文件已经接收完,但是还不断去tcp连接中读取数据,这样界面上一直会显示没有正常结束) * 2009-11-20 源码包不能安装,更新 * 2009-11-19 修正已发现的致命错误,并更新源码包 * 2009-11-01 发布最新版iptux-0.5.1源码包 * 2009-10-10 貌似0.5.0这个版本中的问题很多啊,这几天我都在不停的改版本号。 * 2009-10-09 降低iptux对`Gtk+`高版本库的依赖,现在iptux需要的`Gtk+`库的最低版本为2.12.0,如果还低于此版本,那我只能表示很抱歉了。 * 2009-10-08 发布最新版iptux-0.5.0源码包。另,鉴于很多哥们的库版本比较低,所以这一次除了发布一个正规的版本(0.5.0)外,顺便也发布了一个对库文件要求较低的版本(0.5.0-lv),所以下载的时候请参考自己的实际情形选择下载。 * 2009-09-30 郁闷,有些人加入了项目之后都不做事,这算什么嘛?我决定清理成员了 * 2009-05-12 继续0.4.6版开发,加入聊天窗口中对http://等url的识别和链接功能 * 2009-03-09 鉴于0.4.5版中存在一个严重错误,所以建议尽快更新为0.4.5-1版 * 2009-03-02 发布最新iptux-0.4.5源码包 * 2009-01-17 发布最新iptux-0.4.4源码包 * 2008-12-31 新加入项目成员 pentie@gmail.com ,PT * 2008-12-24 发布iptux-0.4.3 .rpm包,由网友 liangsuilong 提供 * 2008-12-17 发布iptux-0.4.3 .deb及二进制包,由网友 mdjhu@sina.com 提供 * 2008-12-16 发布最新iptux-0.4.3源码包 * 2008-12-07 发布最新iptux-0.4.2相关包,二进制包由网友 mdjhu@sina.com 提供 * 2008-12-04 新上传三个二进制包,由网友 mdjhu@sina.com 提供 iptux-0.6.3/README.md000066400000000000000000000035651257720006400141640ustar00rootroot00000000000000# iptux: 飞鸽传书GNU/Linux版 * If anyone want to adopt this software, please fill an issue at https://github.com/iptux-src/iptux/issues/new [![Build Status](https://travis-ci.org/iptux-src/iptux.png?branch=master)](https://travis-ci.org/iptux-src/iptux) [![GitHub version](https://badge.fury.io/gh/iptux-src%2Fiptux.png)](http://badge.fury.io/gh/iptux-src%2Fiptux) # Build ## Linux (Ubuntu) ``` sudo apt-get install git libgtk2.0-dev libgconf2-dev g++ make autoconf libtool automake git clone git://github.com/iptux-src/iptux.git cd iptux ./configure make sudo make install iptux ``` ## Mac OSX ``` brew install autoconf gettext gtk+ gconf git clone git://github.com/iptux-src/iptux.git cd iptux ./configure CPPFLAGS="-I/usr/local/opt/gettext/include" PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig make sudo make install iptux ``` ## 贡献 * [launchpad](http://translations.launchpad.net/iptux/trunk) ,为iptux贡献翻译。页面由lidaobing(lidaobing@gmail.com)提供; * 欢迎为iptux(最新版)制作二进制包、提供补丁。 ## 声明 请总是使用最新版本!! * 老版本中出现的bug可能已被修正; * 许多新特性需要您的试用 ## 基本 兼容Win版飞鸽传书、飞秋和android版飞鸽协议,实现局域网的通信,文件传输 ## 提高 自定义一部分命令字,实现文件共享功能,群组通信,自动识别编码 ## 相关 请查看Wiki标签,那里可能有你需要的内容! ## 必须 * 打开防火墙的 TCP/UDP 2425 端口 * 运行命令: `gconftool-2 --recursive-unset /apps/iptux` (使用时机: 从<=0.4.5升级到>=0.5.0) * 运行命令: `sudo gtk-update-icon-cache PREFIX/share/icons/hicolor` (使用时机: 图标显示异常,PREFIX为程序安装目录) ## TODO 错误不可避免,请发送错误到 https://github.com/iptux-src/iptux/issues 同时可以去 https://github.com/iptux-src/iptux/issues iptux-0.6.3/aclocal.m4000066400000000000000000001774261257720006400145550ustar00rootroot00000000000000# generated automatically by aclocal 1.15 -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 1995-2002 Free Software Foundation, Inc. # Copyright (C) 2001-2003,2004 Red Hat, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # # Macro to add for using GNU gettext. # Ulrich Drepper , 1995, 1996 # # Modified to never use included libintl. # Owen Taylor , 12/15/1998 # # Major rework to remove unused code # Owen Taylor , 12/11/2002 # # Added better handling of ALL_LINGUAS from GNU gettext version # written by Bruno Haible, Owen Taylor 5/30/3002 # # Modified to require ngettext # Matthias Clasen 08/06/2004 # # We need this here as well, since someone might use autoconf-2.5x # to configure GLib then an older version to configure a package # using AM_GLIB_GNU_GETTEXT AC_PREREQ(2.53) dnl dnl We go to great lengths to make sure that aclocal won't dnl try to pull in the installed version of these macros dnl when running aclocal in the glib directory. dnl m4_copy([AC_DEFUN],[glib_DEFUN]) m4_copy([AC_REQUIRE],[glib_REQUIRE]) dnl dnl At the end, if we're not within glib, we'll define the public dnl definitions in terms of our private definitions. dnl # GLIB_LC_MESSAGES #-------------------- glib_DEFUN([GLIB_LC_MESSAGES], [AC_CHECK_HEADERS([locale.h]) if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi fi]) # GLIB_PATH_PROG_WITH_TEST #---------------------------- dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) # GLIB_WITH_NLS #----------------- glib_DEFUN([GLIB_WITH_NLS], dnl NLS is obligatory [USE_NLS=yes AC_SUBST(USE_NLS) gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= AC_CHECK_HEADER(libintl.h, [gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, [AC_TRY_LINK([ #include ], [return !ngettext ("","", 1)], gt_cv_func_ngettext_libc=yes, gt_cv_func_ngettext_libc=no) ]) if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, [AC_TRY_LINK([ #include ], [return !dgettext ("","")], gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no) ]) fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CHECK_FUNCS(bind_textdomain_codeset) fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then AC_CHECK_LIB(intl, bindtextdomain, [AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dgettext, gt_cv_func_dgettext_libintl=yes)])]) if test "$gt_cv_func_dgettext_libintl" != "yes" ; then AC_MSG_CHECKING([if -liconv is needed to use gettext]) AC_MSG_RESULT([]) AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dcgettext, [gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv], :,-liconv)], :,-liconv) fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset AC_CHECK_FUNCS(bind_textdomain_codeset) LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then AC_DEFINE(HAVE_GETTEXT,1, [Define if the GNU gettext() function is already present or preinstalled.]) GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" AC_CHECK_FUNCS(dcgettext) MSGFMT_OPTS= AC_MSG_CHECKING([if msgfmt accepts -c]) GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[ msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) AC_SUBST(MSGFMT_OPTS) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr], [CATOBJEXT=.gmo DATADIRNAME=share], [case $host in *-*-solaris*) dnl On Solaris, if bind_textdomain_codeset is in libc, dnl GNU format message catalog is always supported, dnl since both are added to the libc all together. dnl Hence, we'd like to go with DATADIRNAME=share and dnl and CATOBJEXT=.gmo in this case. AC_CHECK_FUNC(bind_textdomain_codeset, [CATOBJEXT=.gmo DATADIRNAME=share], [CATOBJEXT=.mo DATADIRNAME=lib]) ;; *-*-openbsd*) CATOBJEXT=.mo DATADIRNAME=share ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac]) LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi ]) if test "$gt_cv_have_gettext" = "yes" ; then AC_DEFINE(ENABLE_NLS, 1, [always defined to indicate that i18n is enabled]) fi dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is not GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po AC_OUTPUT_COMMANDS( [case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac]) dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs dnl in configure.ac. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done dnl Make all variables we use known to autoconf. AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) AC_SUBST(DATADIRNAME) AC_SUBST(GMOFILES) AC_SUBST(INSTOBJEXT) AC_SUBST(INTLLIBS) AC_SUBST(PO_IN_DATADIR_TRUE) AC_SUBST(PO_IN_DATADIR_FALSE) AC_SUBST(POFILES) AC_SUBST(POSUB) ]) # AM_GLIB_GNU_GETTEXT # ------------------- # Do checks necessary for use of gettext. If a suitable implementation # of gettext is found in either in libintl or in the C library, # it will set INTLLIBS to the libraries needed for use of gettext # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() # on various variables needed by the Makefile.in.in installed by # glib-gettextize. dnl glib_DEFUN([GLIB_GNU_GETTEXT], [AC_REQUIRE([AC_PROG_CC])dnl GLIB_LC_MESSAGES GLIB_WITH_NLS if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) fi dnl Construct list of names of catalog files to be constructed. if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but ($top_srcdir). dnl Try to locate is. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) dnl Generate list of files to be processed by xgettext which will dnl be included in po/Makefile. test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ]) # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) # ------------------------------- # Define VARIABLE to the location where catalog files will # be installed by po/Makefile. glib_DEFUN([GLIB_DEFINE_LOCALEDIR], [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl glib_save_prefix="$prefix" glib_save_exec_prefix="$exec_prefix" glib_save_datarootdir="$datarootdir" test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix=$prefix datarootdir=`eval echo "${datarootdir}"` if test "x$CATOBJEXT" = "x.mo" ; then localedir=`eval echo "${libdir}/locale"` else localedir=`eval echo "${datadir}/locale"` fi prefix="$glib_save_prefix" exec_prefix="$glib_save_exec_prefix" datarootdir="$glib_save_datarootdir" AC_DEFINE_UNQUOTED($1, "$localedir", [Define the location where the catalogs will be installed]) ]) dnl dnl Now the definitions that aclocal will find dnl ifdef(glib_configure_ac,[],[ AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) ])dnl # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL]) # # Create a temporary file with TEST-FILE as its contents and pass the # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with # 0 and perform ACTION-IF-FAIL for any other exit status. AC_DEFUN([GLIB_RUN_PROG], [cat >conftest.foo <<_ACEOF $2 _ACEOF if AC_RUN_LOG([$1 conftest.foo]); then m4_ifval([$3], [$3], [:]) m4_ifvaln([$4], [else $4])dnl echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD fi]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # PKG_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable pkgconfigdir as the location where a module # should install pkg-config .pc files. By default the directory is # $libdir/pkgconfig, but the default can be changed by passing # DIRECTORY. The user can override through the --with-pkgconfigdir # parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) dnl PKG_INSTALLDIR # PKG_NOARCH_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable noarch_pkgconfigdir as the location where a # module should install arch-independent pkg-config .pc files. By # default the directory is $datadir/pkgconfig, but the default can be # changed by passing DIRECTORY. The user can override through the # --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) dnl PKG_NOARCH_INSTALLDIR # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # ------------------------------------------- # Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])# PKG_CHECK_VAR # Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless 'enable' is passed literally. # For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], am_maintainer_other[ make rules and dependencies not useful (and sometimes confusing) to the casual installer])], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR iptux-0.6.3/compile000077500000000000000000000162451257720006400142620ustar00rootroot00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: iptux-0.6.3/config.guess000077500000000000000000001223741257720006400152250ustar00rootroot00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-06-17' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown ## for Red Hat Linux if test -f /etc/redhat-release ; then VENDOR=redhat ; else VENDOR= ; fi # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; macppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mipseb-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha*:OpenVMS:*:*) echo alpha-hp-vms exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit 0 ;; DRS?6000:UNIX_SV:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c \ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then # avoid double evaluation of $set_cc_for_build test -n "$CC_FOR_BUILD" || eval $set_cc_for_build if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; *:UNICOS/mp:*:*) echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) # Determine whether the default compiler uses glibc. eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #if __GLIBC__ >= 2 LIBC=gnu #else LIBC= #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; x86:Interix*:[34]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit 0 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ARM_EABI__ >/dev/null then echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu else echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnueabi fi exit 0 ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-${VENDOR:-unknown}-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-${VENDOR:-unknown}-linux-gnu exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR:-ibm}-linux-gnu exit 0 ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-${VENDOR:-unknown}-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit 0 ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR:-pc}-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i*86:*:5:[78]*) case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit 0 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit 0 ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) case `uname -p` in *86) UNAME_PROCESSOR=i686 ;; powerpc) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: iptux-0.6.3/config.h.in000066400000000000000000000151421257720006400147220ustar00rootroot00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* always defined to indicate that i18n is enabled */ #undef ENABLE_NLS /* Gettext Package */ #undef GETTEXT_PACKAGE /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the `bind_textdomain_codeset' function. */ #undef HAVE_BIND_TEXTDOMAIN_CODESET /* Define to 1 if you have the `bzero' function. */ #undef HAVE_BZERO /* Define to 1 if you have the `dcgettext' function. */ #undef HAVE_DCGETTEXT /* Define to 1 if you have the `endpwent' function. */ #undef HAVE_ENDPWENT /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK /* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define if you system has installed gstreamer already */ #undef HAVE_GST /* Define to 1 if you have the `inet_ntoa' function. */ #undef HAVE_INET_NTOA /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if your file defines LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the `memchr' function. */ #undef HAVE_MEMCHR /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `mkdir' function. */ #undef HAVE_MKDIR /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the `rmdir' function. */ #undef HAVE_RMDIR /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the `strpbrk' function. */ #undef HAVE_STRPBRK /* Define to 1 if you have the `strrchr' function. */ #undef HAVE_STRRCHR /* Define to 1 if you have the `strspn' function. */ #undef HAVE_STRSPN /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `vfork' function. */ #undef HAVE_VFORK /* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H /* Define to 1 if `fork' works. */ #undef HAVE_WORKING_FORK /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Define if you want to print message */ #undef MESSAGE /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define if you want to print trace */ #undef TRACE /* Version number of package */ #undef VERSION /* Define if you want to print warning */ #undef WARNING /* Define for Solaris 2.5.1 so the uint32_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ #undef _UINT32_T /* Define for Solaris 2.5.1 so the uint8_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ #undef _UINT8_T /* System Data Directory */ #undef __DATA_PATH /* System Applications Directory */ #undef __DESKTOP_PATH /* System Execute Directory */ #undef __EXEC_PATH /* Define if you want to use defined macros for iptux */ #undef __IP_TUX__ /* System Locale Directory */ #undef __LOCALE_PATH /* Iptux Logo Directory */ #undef __LOGO_PATH /* Iptux Pixmaps Directory */ #undef __PIXMAPS_PATH /* Iptux Sound Directory */ #undef __SOUND_PATH /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to the type of a signed integer type of width exactly 64 bits if such a type exists and the standard includes do not define it. */ #undef int64_t /* Define to `int' if does not define. */ #undef mode_t /* Define to `int' if does not define. */ #undef pid_t /* Define to `unsigned int' if does not define. */ #undef size_t /* Define to `int' if does not define. */ #undef ssize_t /* Define to the type of an unsigned integer type of width exactly 16 bits if such a type exists and the standard includes do not define it. */ #undef uint16_t /* Define to the type of an unsigned integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ #undef uint32_t /* Define to the type of an unsigned integer type of width exactly 8 bits if such a type exists and the standard includes do not define it. */ #undef uint8_t /* Define as `fork' if `vfork' does not work. */ #undef vfork iptux-0.6.3/config.sub000077500000000000000000000730551257720006400146710ustar00rootroot00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-06-18' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit 0;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k \ | m32r | m68000 | m68k | m88k | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | msp430 \ | ns16k | ns32k \ | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | s390 | s390x \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* \ | m32r-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | msp430-* \ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | s390-* | s390x-* \ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nv1) basic_machine=nv1-cray os=-unicosmp ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; or32 | or32-*) basic_machine=or32-unknown os=-coff ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sh64) basic_machine=sh64-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: iptux-0.6.3/configure000077500000000000000000007372001257720006400146140ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for iptux 0.6.3. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: https://github.com/iptux-src/iptux/issues about your $0: system, including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='iptux' PACKAGE_TARNAME='iptux' PACKAGE_VERSION='0.6.3' PACKAGE_STRING='iptux 0.6.3' PACKAGE_BUGREPORT='https://github.com/iptux-src/iptux/issues' PACKAGE_URL='' ac_unique_file="config.h.in" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS MKINSTALLDIRS POSUB POFILES PO_IN_DATADIR_FALSE PO_IN_DATADIR_TRUE INTLLIBS INSTOBJEXT GMOFILES DATADIRNAME CATOBJEXT CATALOGS XGETTEXT GMSGFMT MSGFMT_OPTS MSGFMT USE_NLS GETTEXT_PACKAGE PACKAGE_LIBS PACKAGE_CFLAGS GST_LIBS GST_CFLAGS GCONF_LIBS GCONF_CFLAGS GTK_LIBS GTK_CFLAGS GTHREAD_LIBS GTHREAD_CFLAGS GLIB_LIBS GLIB_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG sounddir pixmapsdir logodir desktopdir EGREP GREP RANLIB LN_S CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE ac_ct_CC CFLAGS CC am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CXX CPPFLAGS LDFLAGS CXXFLAGS CXX AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_silent_rules enable_dependency_tracking enable_message enable_warning enable_trace ' ac_precious_vars='build_alias host_alias target_alias CXX CXXFLAGS LDFLAGS LIBS CPPFLAGS CCC CC CFLAGS CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR GLIB_CFLAGS GLIB_LIBS GTHREAD_CFLAGS GTHREAD_LIBS GTK_CFLAGS GTK_LIBS GCONF_CFLAGS GCONF_LIBS GST_CFLAGS GST_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures iptux 0.6.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/iptux] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of iptux 0.6.3:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-message disable print message [default=yes] --disable-warning disable print warning [default=yes] --enable-trace enable print trace [default=no] Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CC C compiler command CFLAGS C compiler flags CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config GLIB_LIBS linker flags for GLIB, overriding pkg-config GTHREAD_CFLAGS C compiler flags for GTHREAD, overriding pkg-config GTHREAD_LIBS linker flags for GTHREAD, overriding pkg-config GTK_CFLAGS C compiler flags for GTK, overriding pkg-config GTK_LIBS linker flags for GTK, overriding pkg-config GCONF_CFLAGS C compiler flags for GCONF, overriding pkg-config GCONF_LIBS linker flags for GCONF, overriding pkg-config GST_CFLAGS C compiler flags for GST, overriding pkg-config GST_LIBS linker flags for GST, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF iptux configure 0.6.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## -------------------------------------------------------- ## ## Report this to https://github.com/iptux-src/iptux/issues ## ## -------------------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_find_intX_t LINENO BITS VAR # ----------------------------------- # Finds a signed integer type with width BITS, setting cache variable VAR # accordingly. ac_fn_c_find_intX_t () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5 $as_echo_n "checking for int$2_t... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in int$2_t 'int' 'long int' \ 'long long int' 'short int' 'signed char'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default enum { N = $2 / 2 - 1 }; int main () { static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default enum { N = $2 / 2 - 1 }; int main () { static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1) < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else case $ac_type in #( int$2_t) : eval "$3=yes" ;; #( *) : eval "$3=\$ac_type" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if eval test \"x\$"$3"\" = x"no"; then : else break fi done fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_intX_t # ac_fn_c_find_uintX_t LINENO BITS VAR # ------------------------------------ # Finds an unsigned integer type with width BITS, setting cache variable VAR # accordingly. ac_fn_c_find_uintX_t () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 $as_echo_n "checking for uint$2_t... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ 'unsigned long long int' 'unsigned short int' 'unsigned char'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : case $ac_type in #( uint$2_t) : eval "$3=yes" ;; #( *) : eval "$3=\$ac_type" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if eval test \"x\$"$3"\" = x"no"; then : else break fi done fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_uintX_t # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by iptux $as_me 0.6.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE ac_config_headers="$ac_config_headers config.h" am__api_version='1.15' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='iptux' VERSION='0.6.3' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi # Checks for programs. ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 $as_echo_n "checking whether the C++ compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C++ compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5 $as_echo_n "checking for C++ compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi # Checks for libraries. # Checks for header files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in arpa/inet.h fcntl.h inttypes.h libintl.h locale.h \ netinet/in.h stdint.h stdlib.h string.h strings.h \ sys/ioctl.h sys/socket.h sys/time.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else as_fn_error $? "Couldn't find some header file" "$LINENO" 5 fi done # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t" case $ac_cv_c_int64_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define int64_t $ac_cv_c_int64_t _ACEOF ;; esac ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" if test "x$ac_cv_type_mode_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define mode_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" if test "x$ac_cv_type_ssize_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define ssize_t int _ACEOF fi ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t" case $ac_cv_c_uint16_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define uint16_t $ac_cv_c_uint16_t _ACEOF ;; esac ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" case $ac_cv_c_uint32_t in #( no|yes) ;; #( *) $as_echo "#define _UINT32_T 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define uint32_t $ac_cv_c_uint32_t _ACEOF ;; esac ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t" case $ac_cv_c_uint8_t in #( no|yes) ;; #( *) $as_echo "#define _UINT8_T 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define uint8_t $ac_cv_c_uint8_t _ACEOF ;; esac # Checks for library functions. ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi for ac_header in vfork.h do : ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" if test "x$ac_cv_header_vfork_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VFORK_H 1 _ACEOF fi done for ac_func in fork vfork do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } if ${ac_cv_func_fork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_fork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_fork_works=yes else ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 $as_echo "$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_vfork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_vfork_works=yes else ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 $as_echo "$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h else $as_echo "#define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h fi for ac_func in bzero endpwent getcwd gettimeofday inet_ntoa memchr memmove \ mkdir rmdir setlocale socket strcasecmp strchr strerror \ strncasecmp strpbrk strrchr strspn do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done $as_echo "#define __IP_TUX__ 1" >>confdefs.h # Check whether --enable-message was given. if test "${enable_message+set}" = set; then : enableval=$enable_message; enable_message=$enableval else enable_message=yes fi if test "x${enable_message}" = "xyes" ; then $as_echo "#define MESSAGE 1" >>confdefs.h fi # Check whether --enable-warning was given. if test "${enable_warning+set}" = set; then : enableval=$enable_warning; enable_warning=$enableval else enable_warning=yes fi if test "x${enable_warning}" = "xyes" ; then $as_echo "#define WARNING 1" >>confdefs.h fi # Check whether --enable-trace was given. if test "${enable_trace+set}" = set; then : enableval=$enable_trace; enable_trace=$enableval else enable_trace=no fi if test "x${enable_trace}" = "xyes" ; then $as_echo "#define TRACE 1" >>confdefs.h fi test "x${prefix}" = xNONE && prefix="${ac_default_prefix}" test "x${exec_prefix}" = xNONE && exec_prefix="${prefix}" tmpdir=`eval echo ${bindir}` cat >>confdefs.h <<_ACEOF #define __EXEC_PATH "${tmpdir}" _ACEOF tmpdir=`eval echo ${datadir}` tmpdir=`eval echo ${tmpdir}` cat >>confdefs.h <<_ACEOF #define __DATA_PATH "${tmpdir}" _ACEOF localedir="${tmpdir}/locale" cat >>confdefs.h <<_ACEOF #define __LOCALE_PATH "${localedir}" _ACEOF desktopdir="${tmpdir}/applications" cat >>confdefs.h <<_ACEOF #define __DESKTOP_PATH "${desktopdir}" _ACEOF logodir="${tmpdir}/icons" cat >>confdefs.h <<_ACEOF #define __LOGO_PATH "${logodir}" _ACEOF pixmapsdir="${tmpdir}/iptux/pixmaps" cat >>confdefs.h <<_ACEOF #define __PIXMAPS_PATH "${pixmapsdir}" _ACEOF sounddir="${tmpdir}/iptux/sound" cat >>confdefs.h <<_ACEOF #define __SOUND_PATH "${sounddir}" _ACEOF glib_modules="glib-2.0 >= 2.16.0" if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5 $as_echo_n "checking for GLIB... " >&6; } if test -n "$GLIB_CFLAGS"; then pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$glib_modules\""; } >&5 ($PKG_CONFIG --exists --print-errors "$glib_modules") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "$glib_modules" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GLIB_LIBS"; then pkg_cv_GLIB_LIBS="$GLIB_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$glib_modules\""; } >&5 ($PKG_CONFIG --exists --print-errors "$glib_modules") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "$glib_modules" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$glib_modules" 2>&1` else GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$glib_modules" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GLIB_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ($glib_modules) were not met: $GLIB_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GLIB_CFLAGS and GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GLIB_CFLAGS and GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS GLIB_LIBS=$pkg_cv_GLIB_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi gthread_modules="gthread-2.0 >= 2.14.0" pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTHREAD" >&5 $as_echo_n "checking for GTHREAD... " >&6; } if test -n "$GTHREAD_CFLAGS"; then pkg_cv_GTHREAD_CFLAGS="$GTHREAD_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$gthread_modules\""; } >&5 ($PKG_CONFIG --exists --print-errors "$gthread_modules") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTHREAD_CFLAGS=`$PKG_CONFIG --cflags "$gthread_modules" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GTHREAD_LIBS"; then pkg_cv_GTHREAD_LIBS="$GTHREAD_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$gthread_modules\""; } >&5 ($PKG_CONFIG --exists --print-errors "$gthread_modules") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTHREAD_LIBS=`$PKG_CONFIG --libs "$gthread_modules" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTHREAD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$gthread_modules" 2>&1` else GTHREAD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$gthread_modules" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GTHREAD_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ($gthread_modules) were not met: $GTHREAD_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GTHREAD_CFLAGS and GTHREAD_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GTHREAD_CFLAGS and GTHREAD_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else GTHREAD_CFLAGS=$pkg_cv_GTHREAD_CFLAGS GTHREAD_LIBS=$pkg_cv_GTHREAD_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi gtk_modules="gtk+-2.0 >= 2.12.0" pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5 $as_echo_n "checking for GTK... " >&6; } if test -n "$GTK_CFLAGS"; then pkg_cv_GTK_CFLAGS="$GTK_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$gtk_modules\""; } >&5 ($PKG_CONFIG --exists --print-errors "$gtk_modules") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "$gtk_modules" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GTK_LIBS"; then pkg_cv_GTK_LIBS="$GTK_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$gtk_modules\""; } >&5 ($PKG_CONFIG --exists --print-errors "$gtk_modules") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "$gtk_modules" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$gtk_modules" 2>&1` else GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$gtk_modules" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GTK_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ($gtk_modules) were not met: $GTK_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GTK_CFLAGS and GTK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GTK_CFLAGS and GTK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else GTK_CFLAGS=$pkg_cv_GTK_CFLAGS GTK_LIBS=$pkg_cv_GTK_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi gconf_modules="gconf-2.0 >= 2.4.0" pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCONF" >&5 $as_echo_n "checking for GCONF... " >&6; } if test -n "$GCONF_CFLAGS"; then pkg_cv_GCONF_CFLAGS="$GCONF_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$gconf_modules\""; } >&5 ($PKG_CONFIG --exists --print-errors "$gconf_modules") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GCONF_CFLAGS=`$PKG_CONFIG --cflags "$gconf_modules" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GCONF_LIBS"; then pkg_cv_GCONF_LIBS="$GCONF_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$gconf_modules\""; } >&5 ($PKG_CONFIG --exists --print-errors "$gconf_modules") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GCONF_LIBS=`$PKG_CONFIG --libs "$gconf_modules" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GCONF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$gconf_modules" 2>&1` else GCONF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$gconf_modules" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GCONF_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ($gconf_modules) were not met: $GCONF_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GCONF_CFLAGS and GCONF_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GCONF_CFLAGS and GCONF_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else GCONF_CFLAGS=$pkg_cv_GCONF_CFLAGS GCONF_LIBS=$pkg_cv_GCONF_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi gst_modules="gstreamer-1.0 >= 1.0" pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GST" >&5 $as_echo_n "checking for GST... " >&6; } if test -n "$GST_CFLAGS"; then pkg_cv_GST_CFLAGS="$GST_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$gst_modules\""; } >&5 ($PKG_CONFIG --exists --print-errors "$gst_modules") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GST_CFLAGS=`$PKG_CONFIG --cflags "$gst_modules" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GST_LIBS"; then pkg_cv_GST_LIBS="$GST_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$gst_modules\""; } >&5 ($PKG_CONFIG --exists --print-errors "$gst_modules") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GST_LIBS=`$PKG_CONFIG --libs "$gst_modules" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GST_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$gst_modules" 2>&1` else GST_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$gst_modules" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GST_PKG_ERRORS" >&5 have_gst=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } have_gst=no else GST_CFLAGS=$pkg_cv_GST_CFLAGS GST_LIBS=$pkg_cv_GST_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_gst=yes fi if test "${have_gst}" = yes ; then $as_echo "#define HAVE_GST 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You need GStreamer-1.0 or later installed if you need sound relevant functions" >&5 $as_echo "$as_me: WARNING: You need GStreamer-1.0 or later installed if you need sound relevant functions" >&2;} fi PACKAGE_CFLAGS="${GLIB_CFLAGS} ${GTHREAD_CFLAGS} ${GTK_CFLAGS} ${GCONF_CFLAGS} ${GST_CFLAGS}" PACKAGE_LIBS="${GLIB_LIBS} ${GTHREAD_LIBS} ${GTK_LIBS} ${GCONF_LIBS} ${GST_LIBS}" GETTEXT_PACKAGE=iptux cat >>confdefs.h <<_ACEOF #define GETTEXT_PACKAGE "${GETTEXT_PACKAGE}" _ACEOF ALL_LINGUAS="de en_GB es pl zh_CN zh_TW" for ac_header in locale.h do : ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" if test "x$ac_cv_header_locale_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LOCALE_H 1 _ACEOF fi done if test $ac_cv_header_locale_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 $as_echo_n "checking for LC_MESSAGES... " >&6; } if ${am_cv_val_LC_MESSAGES+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return LC_MESSAGES ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_val_LC_MESSAGES=yes else am_cv_val_LC_MESSAGES=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 $as_echo "$am_cv_val_LC_MESSAGES" >&6; } if test $am_cv_val_LC_MESSAGES = yes; then $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h fi fi USE_NLS=yes gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" if test "x$ac_cv_header_libintl_h" = xyes; then : gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5 $as_echo_n "checking for ngettext in libc... " >&6; } if ${gt_cv_func_ngettext_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return !ngettext ("","", 1) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_ngettext_libc=yes else gt_cv_func_ngettext_libc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5 $as_echo "$gt_cv_func_ngettext_libc" >&6; } if test "$gt_cv_func_ngettext_libc" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5 $as_echo_n "checking for dgettext in libc... " >&6; } if ${gt_cv_func_dgettext_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return !dgettext ("","") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_dgettext_libc=yes else gt_cv_func_dgettext_libc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5 $as_echo "$gt_cv_func_dgettext_libc" >&6; } fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then for ac_func in bind_textdomain_codeset do : ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BIND_TEXTDOMAIN_CODESET 1 _ACEOF fi done fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; } if ${ac_cv_lib_intl_bindtextdomain+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bindtextdomain (); int main () { return bindtextdomain (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_bindtextdomain=yes else ac_cv_lib_intl_bindtextdomain=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; } if test "x$ac_cv_lib_intl_bindtextdomain" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5 $as_echo_n "checking for ngettext in -lintl... " >&6; } if ${ac_cv_lib_intl_ngettext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_ngettext=yes else ac_cv_lib_intl_ngettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5 $as_echo "$ac_cv_lib_intl_ngettext" >&6; } if test "x$ac_cv_lib_intl_ngettext" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 $as_echo_n "checking for dgettext in -lintl... " >&6; } if ${ac_cv_lib_intl_dgettext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dgettext (); int main () { return dgettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_dgettext=yes else ac_cv_lib_intl_dgettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 $as_echo "$ac_cv_lib_intl_dgettext" >&6; } if test "x$ac_cv_lib_intl_dgettext" = xyes; then : gt_cv_func_dgettext_libintl=yes fi fi fi if test "$gt_cv_func_dgettext_libintl" != "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5 $as_echo_n "checking if -liconv is needed to use gettext... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5 $as_echo_n "checking for ngettext in -lintl... " >&6; } if ${ac_cv_lib_intl_ngettext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_ngettext=yes else ac_cv_lib_intl_ngettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5 $as_echo "$ac_cv_lib_intl_ngettext" >&6; } if test "x$ac_cv_lib_intl_ngettext" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5 $as_echo_n "checking for dcgettext in -lintl... " >&6; } if ${ac_cv_lib_intl_dcgettext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dcgettext (); int main () { return dcgettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_dcgettext=yes else ac_cv_lib_intl_dcgettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5 $as_echo "$ac_cv_lib_intl_dcgettext" >&6; } if test "x$ac_cv_lib_intl_dcgettext" = xyes; then : gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv else : fi else : fi fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset for ac_func in bind_textdomain_codeset do : ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BIND_TEXTDOMAIN_CODESET 1 _ACEOF fi done LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in /*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then ac_cv_path_MSGFMT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" for ac_func in dcgettext do : ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext" if test "x$ac_cv_func_dcgettext" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DCGETTEXT 1 _ACEOF fi done MSGFMT_OPTS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5 $as_echo_n "checking if msgfmt accepts -c... " >&6; } cat >conftest.foo <<_ACEOF msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" _ACEOF if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5 ($MSGFMT -c -o /dev/null conftest.foo) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "$as_me: failed input was:" >&5 sed 's/^/| /' conftest.foo >&5 fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : CATOBJEXT=.gmo DATADIRNAME=share else case $host in *-*-solaris*) ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then : CATOBJEXT=.gmo DATADIRNAME=share else CATOBJEXT=.mo DATADIRNAME=lib fi ;; *-*-openbsd*) CATOBJEXT=.mo DATADIRNAME=share ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi fi if test "$gt_cv_have_gettext" = "yes" ; then $as_echo "#define ENABLE_NLS 1" >>confdefs.h fi if test "$XGETTEXT" != ":"; then if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; } XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po ac_config_commands="$ac_config_commands default-1" for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 $as_echo_n "checking for catalogs to be installed... " >&6; } NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 $as_echo "$LINGUAS" >&6; } fi if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ac_config_files="$ac_config_files Makefile desktop/Makefile pixmaps/Makefile po/Makefile.in sound/Makefile src/Makefile src/uninstall/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by iptux $as_me 0.6.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ iptux config.status 0.6.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "desktop/Makefile") CONFIG_FILES="$CONFIG_FILES desktop/Makefile" ;; "pixmaps/Makefile") CONFIG_FILES="$CONFIG_FILES pixmaps/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "sound/Makefile") CONFIG_FILES="$CONFIG_FILES sound/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/uninstall/Makefile") CONFIG_FILES="$CONFIG_FILES src/uninstall/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi iptux-0.6.3/configure.ac000077500000000000000000000117121257720006400151670ustar00rootroot00000000000000# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_INIT(iptux, 0.6.3, [https://github.com/iptux-src/iptux/issues]) AM_MAINTAINER_MODE AC_CONFIG_SRCDIR(config.h.in) AC_CONFIG_HEADERS(config.h) AM_INIT_AUTOMAKE(foreign dist-bzip2 -Wall) # Checks for programs. AC_PROG_CXX AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_RANLIB # Checks for libraries. # Checks for header files. AC_CHECK_HEADERS(arpa/inet.h fcntl.h inttypes.h libintl.h locale.h \ netinet/in.h stdint.h stdlib.h string.h strings.h \ sys/ioctl.h sys/socket.h sys/time.h unistd.h, [], AC_MSG_ERROR([Couldn't find some header file])) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_C_INLINE AC_TYPE_INT64_T AC_TYPE_MODE_T AC_TYPE_SIZE_T AC_TYPE_SSIZE_T AC_TYPE_UINT16_T AC_TYPE_UINT32_T AC_TYPE_UINT8_T AH_TEMPLATE([GETTEXT_PACKAGE], [Gettext Package]) AH_TEMPLATE([__EXEC_PATH], [System Execute Directory]) AH_TEMPLATE([__DATA_PATH], [System Data Directory]) AH_TEMPLATE([__LOCALE_PATH], [System Locale Directory]) AH_TEMPLATE([__DESKTOP_PATH], [System Applications Directory]) AH_TEMPLATE([__LOGO_PATH], [Iptux Logo Directory]) AH_TEMPLATE([__PIXMAPS_PATH], [Iptux Pixmaps Directory]) AH_TEMPLATE([__SOUND_PATH], [Iptux Sound Directory]) AH_TEMPLATE([__IP_TUX__], [Define if you want to use defined macros for iptux]) AH_TEMPLATE([HAVE_GST], [Define if you system has installed gstreamer already]) AH_TEMPLATE([MESSAGE], [Define if you want to print message]) AH_TEMPLATE([WARNING], [Define if you want to print warning]) AH_TEMPLATE([TRACE], [Define if you want to print trace]) # Checks for library functions. AC_FUNC_FORK AC_CHECK_FUNCS(bzero endpwent getcwd gettimeofday inet_ntoa memchr memmove \ mkdir rmdir setlocale socket strcasecmp strchr strerror \ strncasecmp strpbrk strrchr strspn) AC_DEFINE(__IP_TUX__) AC_ARG_ENABLE([message], AS_HELP_STRING([--disable-message], [disable print message @<:@default=yes@:>@]), [enable_message=$enableval], [enable_message=yes]) if test "x${enable_message}" = "xyes" ; then AC_DEFINE(MESSAGE, 1, [Define if you want to print message]) fi AC_ARG_ENABLE([warning], AS_HELP_STRING([--disable-warning], [disable print warning @<:@default=yes@:>@]), [enable_warning=$enableval], [enable_warning=yes]) if test "x${enable_warning}" = "xyes" ; then AC_DEFINE(WARNING, 1, [Define if you want to print warning]) fi AC_ARG_ENABLE([trace], AS_HELP_STRING([--enable-trace], [enable print trace @<:@default=no@:>@]), [enable_trace=$enableval], [enable_trace=no]) if test "x${enable_trace}" = "xyes" ; then AC_DEFINE(TRACE, 1, [Define if you want to print trace]) fi dnl In Autoconf 2.63, ${bindir} --> ${exec_prefix} dnl In Autoconf 2.63, ${datadir} --> ${datarootdir} --> ${prefix} test "x${prefix}" = xNONE && prefix="${ac_default_prefix}" test "x${exec_prefix}" = xNONE && exec_prefix="${prefix}" tmpdir=`eval echo ${bindir}` AC_DEFINE_UNQUOTED(__EXEC_PATH, "${tmpdir}") tmpdir=`eval echo ${datadir}` tmpdir=`eval echo ${tmpdir}` AC_DEFINE_UNQUOTED(__DATA_PATH, "${tmpdir}") localedir="${tmpdir}/locale" AC_DEFINE_UNQUOTED(__LOCALE_PATH, "${localedir}") desktopdir="${tmpdir}/applications" AC_DEFINE_UNQUOTED(__DESKTOP_PATH, "${desktopdir}") AC_SUBST(desktopdir) logodir="${tmpdir}/icons" AC_DEFINE_UNQUOTED(__LOGO_PATH, "${logodir}") AC_SUBST(logodir) pixmapsdir="${tmpdir}/iptux/pixmaps" AC_DEFINE_UNQUOTED(__PIXMAPS_PATH, "${pixmapsdir}") AC_SUBST(pixmapsdir) sounddir="${tmpdir}/iptux/sound" AC_DEFINE_UNQUOTED(__SOUND_PATH, "${sounddir}") AC_SUBST(sounddir) glib_modules="glib-2.0 >= 2.16.0" PKG_CHECK_MODULES(GLIB, [$glib_modules]) gthread_modules="gthread-2.0 >= 2.14.0" PKG_CHECK_MODULES(GTHREAD, [$gthread_modules]) gtk_modules="gtk+-2.0 >= 2.12.0" PKG_CHECK_MODULES(GTK, [$gtk_modules]) gconf_modules="gconf-2.0 >= 2.4.0" PKG_CHECK_MODULES(GCONF, [$gconf_modules]) gst_modules="gstreamer-1.0 >= 1.0" PKG_CHECK_MODULES(GST, [$gst_modules], have_gst=yes, have_gst=no) if test "${have_gst}" = yes ; then AC_DEFINE(HAVE_GST) else AC_MSG_WARN(You need GStreamer-1.0 or later installed if you need sound relevant functions) fi PACKAGE_CFLAGS="${GLIB_CFLAGS} ${GTHREAD_CFLAGS} ${GTK_CFLAGS} ${GCONF_CFLAGS} ${GST_CFLAGS}" PACKAGE_LIBS="${GLIB_LIBS} ${GTHREAD_LIBS} ${GTK_LIBS} ${GCONF_LIBS} ${GST_LIBS}" AC_SUBST(PACKAGE_CFLAGS) AC_SUBST(PACKAGE_LIBS) GETTEXT_PACKAGE=iptux AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "${GETTEXT_PACKAGE}") dnl Add the languages which your application supports here. ALL_LINGUAS="de en_GB es pl zh_CN zh_TW" AM_GLIB_GNU_GETTEXT AC_OUTPUT(Makefile desktop/Makefile pixmaps/Makefile po/Makefile.in sound/Makefile \ src/Makefile src/uninstall/Makefile) iptux-0.6.3/depcomp000077500000000000000000000557031257720006400142630ustar00rootroot00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2012-10-18.11; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: iptux-0.6.3/desktop/000077500000000000000000000000001257720006400143455ustar00rootroot00000000000000iptux-0.6.3/desktop/Makefile.am000077500000000000000000000012071257720006400164040ustar00rootroot00000000000000desktop = iptux.desktop logo_64 = hicolor/64x64/apps/ip-tux.png hicolor/64x64/apps/i-tux.png logo_48 = hicolor/48x48/apps/ip-tux.png hicolor/48x48/apps/i-tux.png logo_32 = hicolor/32x32/apps/ip-tux.png hicolor/32x32/apps/i-tux.png logo_24 = hicolor/24x24/apps/ip-tux.png hicolor/24x24/apps/i-tux.png logo_22 = hicolor/22x22/apps/ip-tux.png hicolor/22x22/apps/i-tux.png logo_16 = hicolor/16x16/apps/ip-tux.png hicolor/16x16/apps/i-tux.png logo = $(logo_64) $(logo_48) $(logo_32) $(logo_24) $(logo_22) $(logo_16) EXTRA_DIST = $(desktop) $(logo) desktopdir = @desktopdir@ desktop_DATA = $(desktop) logodir = @logodir@ nobase_dist_logo_DATA = $(logo)iptux-0.6.3/desktop/Makefile.in000066400000000000000000000376451257720006400164310ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = desktop ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(nobase_dist_logo_DATA) \ $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(logodir)" DATA = $(desktop_DATA) $(nobase_dist_logo_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_CFLAGS = @GST_CFLAGS@ GST_LIBS = @GST_LIBS@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ desktopdir = @desktopdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logodir = @logodir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pixmapsdir = @pixmapsdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sounddir = @sounddir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ desktop = iptux.desktop logo_64 = hicolor/64x64/apps/ip-tux.png hicolor/64x64/apps/i-tux.png logo_48 = hicolor/48x48/apps/ip-tux.png hicolor/48x48/apps/i-tux.png logo_32 = hicolor/32x32/apps/ip-tux.png hicolor/32x32/apps/i-tux.png logo_24 = hicolor/24x24/apps/ip-tux.png hicolor/24x24/apps/i-tux.png logo_22 = hicolor/22x22/apps/ip-tux.png hicolor/22x22/apps/i-tux.png logo_16 = hicolor/16x16/apps/ip-tux.png hicolor/16x16/apps/i-tux.png logo = $(logo_64) $(logo_48) $(logo_32) $(logo_24) $(logo_22) $(logo_16) EXTRA_DIST = $(desktop) $(logo) desktop_DATA = $(desktop) nobase_dist_logo_DATA = $(logo) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign desktop/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign desktop/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-desktopDATA: $(desktop_DATA) @$(NORMAL_INSTALL) @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(desktopdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(desktopdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(desktopdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(desktopdir)" || exit $$?; \ done uninstall-desktopDATA: @$(NORMAL_UNINSTALL) @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(desktopdir)'; $(am__uninstall_files_from_dir) install-nobase_dist_logoDATA: $(nobase_dist_logo_DATA) @$(NORMAL_INSTALL) @list='$(nobase_dist_logo_DATA)'; test -n "$(logodir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(logodir)'"; \ $(MKDIR_P) "$(DESTDIR)$(logodir)" || exit 1; \ fi; \ $(am__nobase_list) | while read dir files; do \ xfiles=; for file in $$files; do \ if test -f "$$file"; then xfiles="$$xfiles $$file"; \ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ test -z "$$xfiles" || { \ test "x$$dir" = x. || { \ echo " $(MKDIR_P) '$(DESTDIR)$(logodir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(logodir)/$$dir"; }; \ echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(logodir)/$$dir'"; \ $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(logodir)/$$dir" || exit $$?; }; \ done uninstall-nobase_dist_logoDATA: @$(NORMAL_UNINSTALL) @list='$(nobase_dist_logo_DATA)'; test -n "$(logodir)" || list=; \ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ dir='$(DESTDIR)$(logodir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(logodir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-desktopDATA install-nobase_dist_logoDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-desktopDATA uninstall-nobase_dist_logoDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-desktopDATA install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man \ install-nobase_dist_logoDATA install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am \ uninstall-desktopDATA uninstall-nobase_dist_logoDATA .PRECIOUS: Makefile # 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: iptux-0.6.3/desktop/hicolor/000077500000000000000000000000001257720006400160045ustar00rootroot00000000000000iptux-0.6.3/desktop/hicolor/16x16/000077500000000000000000000000001257720006400165715ustar00rootroot00000000000000iptux-0.6.3/desktop/hicolor/16x16/apps/000077500000000000000000000000001257720006400175345ustar00rootroot00000000000000iptux-0.6.3/desktop/hicolor/16x16/apps/i-tux.png000077500000000000000000000016361257720006400213210ustar00rootroot00000000000000PNG  IHDR醟sBIT|dUIDAT8mKh\usޙIIɔ$iVcZ" *U AEWnfQZ]R(-T4R[+&d4@[d&&f2d7s<gys9= GjK6G'CF e܌ڎKK&gHeЀz_%m:uToz[D"[ߗunO$2 "%q$gFVKrzLy}rQquR:Q΍O1Ȭu2?TJ}n6 \&Mfz$Xbka{hj庿IAa -uo*|2Bi^ ˠ,nMPc~8r=tவ-wX^RnqDPJGDy ׌Ki\.<2dYvDot*~J.yG]hPne B3LK)JJg1¿tߪ;c3Sϕ5&9!/R(9IQ%e+H>G̵諏 ё^Oor<]I("XFGcV?ս quky)4_GȬ$-CҶPL'͇'G;00P3XmzWݽPJ!VoI.wdcw?o58UTIENDB`iptux-0.6.3/desktop/hicolor/16x16/apps/ip-tux.png000077500000000000000000000017021257720006400214730ustar00rootroot00000000000000PNG  IHDR醟sBIT|dyIDAT8m]L[uQJ](oBns2 n1ۅ8KvA.(Co1+fYlb AE-y#?Ysѽi)(gm,޽tvv:fP^fT0RDcTJ}bW35z#>ٮ..NVDJO??gf9uF3c |r4Sp=u88p~ zGGRQOC5N.pk*U^AW5j8v}?VUkkkHvFIENDB`iptux-0.6.3/desktop/hicolor/22x22/000077500000000000000000000000001257720006400165635ustar00rootroot00000000000000iptux-0.6.3/desktop/hicolor/22x22/apps/000077500000000000000000000000001257720006400175265ustar00rootroot00000000000000iptux-0.6.3/desktop/hicolor/22x22/apps/i-tux.png000077500000000000000000000027431257720006400213130ustar00rootroot00000000000000PNG  IHDR+EsBIT|dIDATHmlgszӳShVVK1hpd%ۇiqn"N7/Ѹiۺѭ9eN?Or|HSH^8[lTEh4jԋ/'dĢY+8]ܿa6U'q8\:T +޽驘Y[[YA&Ak8hA;  (-X!R?oSb=NdhlT,e6F7SM}y9p)䏯g{71=KJz%ɓMvê5LŒ8Z/\B .kk¬ sytqPZx4>A^ @,ʏ5d* ֥[@29VB^9Xk9}q%2 (~ZjA;"TiZFHSbA>DΧ1CRX ;"lkB,=?l GE,wToXE HK pAJZ"YYhQnѢE\@KƩmk3s|@K(TgC(b4 ;JB0}v]ft_=9w~G=1"(%9}5̜!o<^l! E1y).Yp]8kcձ }L2֒,9S Ύ&Hy5J+VOָZ3Y窿V`vb^сo~YX_|Cnf G"oH22VJ5)PjT 1吓yZ/֖((ɡ7_ߒ FPc-92k& q.r| zյǐR~d=!63h]NYv~R Wh1BSṡ/_>ߒH* C`Z$)pCTRT?rB*Jh%lJ˾tYk2bkRZ]Ih"-yNJtM>_$=M"܂Lah-oJ{|rZ=;+{#;6[lœlb$HY0 L)1Ĕ&i='} ߺ]/-ݿyOUU e0-imGff8sJ0͖ 'y~;>V+ZKKmϾ32ɜ lbJ)eJ>fkIc1 .]ۨNF<$i?3ՉɊ[fRHj۽Ŷmcȵ s~~ n7}~{{{:u ~)2+@V+#/ޖecVWWwSI !IENDB`iptux-0.6.3/desktop/hicolor/24x24/000077500000000000000000000000001257720006400165675ustar00rootroot00000000000000iptux-0.6.3/desktop/hicolor/24x24/apps/000077500000000000000000000000001257720006400175325ustar00rootroot00000000000000iptux-0.6.3/desktop/hicolor/24x24/apps/i-tux.png000077500000000000000000000031771257720006400213210ustar00rootroot00000000000000PNG  IHDR4.sBIT|d6IDATHilTP]2!/i @8:Jhz%tO@O87wպ) !BZԛBJ|?g,0 g.\MLmXoںHWx}Q.*y:.gR}?G>B4@SBPX"\RN{7nA^dd?'gDDF7/ssKUN̦)3KLfbO!X[Ih; !B[DrJEH!DS S068pRk3=D]]]beBaIENDB`iptux-0.6.3/desktop/hicolor/24x24/apps/ip-tux.png000077500000000000000000000033741257720006400215000ustar00rootroot00000000000000PNG  IHDR4.sBIT|dIDATHilsk/ 0G)!#@)jEUR( -JJU5V"ڪ)"C#7dsp |cz}vmϗьfuq /ﯘJB"1h)u2;3رc׿(2iimsNˮ'ey++摕N`8JexM!ݣgԮXM6^+--5vᴮ7]QKra?X v-aE(jQ>,1N.#w֛o2W=kU6 lX#gY }CQ x\V󛝫a"v?SNn˟1{Fk>`8҄Bf7P__vAf^z3w۶BC㪅dMI!"\rRK qҒ|.[,BfuZ$:w9٧؛'0DkRhuVa(1()BWG8Oopԛs|;{p,B$D21yĊ?a|ZMg' EH7{:Ѥ i{愌&Gk#ܥ$XY0- K;LSh b9+_2UWWW״tn.()o`%F2ɪdxǍ, ۲1@|?b8$#̓?5sGu/x+yQ )@GqZ+LE/Ȣh"ݮD%g'Z! lLIua%'Ef޶bcNfbB䧫|LKO jb3h -ϙFI$Th>R"GJ v/0!>lUeE,($omyr !4UvN) x !HZ#B,KrҥPZQ:g:aAߨA`)*$w+DzزywKKeYnᣖ^lۢcO׃qSeRC)sF{I4n͏LgJRlßnte()YQKqffy)WwR FmMY]+=Pu".l*TdQwomBRԵ8pC2QZ#)Da{칦sAϝKaR98 0Cao'h rkm;XmY(q,=b?xЋ*r,=01"sN10hB2-,aF~vP555wm\'ou<-~ @6DlHf8ba%s ƣ Wi&8Xyu_ZŽ{ԏi7+gWT :`Pl8`Ac=4m9;oAvW?X}}555OvvU\Q=Ir֐>}L2ڵk`7ɯo n;G6v̚ih9"b!vb'͝;܈Fv]ws-l>ӒJϚǀEYTd"z00eBpOq#(IwG;<,5rQuuƍ/u&.;s4;A[g7nh ւ,;k_Da$Dc1<9k֬Y`ᆳ7_=aʘs롵~@ˤV'eϑt$Rl`nB;.G18G_ x[3g(?6ܬ4Z<:P2qx).GRJ'X hr%S+ʨoacn߰aC <d%[ŗ(jtr @)rRJVX4+2l0!G 9()+(R,o' m Lv-/~ZzYzt"[:HA*?8(A9 'Jc`a5iXR $z<.dDQX2W,/LMMMuhu%`ﱶb peʔsI=[IMÑ_%~gN9L`7DIB!ƖP1)[;H+n拖Niwy3̽l鴇O7;{ZWt-Ɍ(?B"Hk_XΪ ӝRr-ojB+>LPSI!S8tV8"AJѧrICbL5wꎟܠPH x?[`" E@( Av&xeQYT5d9('( NaP|yˣLPJ)uFXd" c`OJ(%7OoF!+6 "DeHR8cR V]8#KzqQ>j@9NOMryik? ACh<=|Ɔa X$ w8$uA=Y_ww٬Ol TQa?8+@fSԧ`aQ}PAHvFk3 5{DP/@rÔQ,{wD2i49<GV(o#(=/~+F y#S:/+.;@PLRd*˓{ɝK"badYvIu1X_>crneeMkglYk-AӤ=ñD4z(%C3 0㐊BH\!fd^}930\{]kx!Z\cPBXF#k9z*E .U`E+ֹ 3ncIHi1͠w=Ͽ;u=Ǖ?O`osAR ў .$2P# .ZJ)Pp_%߸9`7۽{;űm(W-R3@ "[ڭE8J2Xȝ[VnݺQV{uʷ?Pp̥ 28RڐX~ϳ$WXh!B #oWvʘk֬=$_3}+WG.9w*D,6_)c֒5ςg,1x&Z`h'_WM,++;+Ya;_*gK0Jak 祥=o]o7N=j+#~xҙ]G :6s5u\o"юFS/W)r2|[E̿i"yAZZx؅ж<3k[nCfL̡ -ضuѮƸL.2.ʒhm8s],ze|4?o /}w9ˁ̹g&cN=|g51@ D5>nOͽ{(^zղhc3x$<\^ @^ rgo 3wS]BeaYR&?j^ey7_U`;.ϾywRߺs'u`͛%Klj.s[~&"M%QJR KY(euX֗Fʤ)}e/mde` ywu2mذa񞳡GgG}sdTnњ%u" |@26QW"*~|_VΠeXjaPʀ ~njRh!"=QJ |bՍc ^Efh]cR`B+ڵkG ҲB'(d %Ы[ wH(n)5ql\!E AG(c dJJRBCL\]@$PZvhfl,2kph1k|E H1{xxv_浊T߲,@-|w\W;My˲d k 6XB,ɔ }Hk|opoO8u juΪ[l^p!,Zx}'L4m\Eor>NBnIC[Ҙ;"Tǘ\u%_]t霮o)G}Z4*{p!!h\cB ,eW !hDP$$=D5)cpo[Yf͚Z0cǎ6nx}vMj\c0u+Dc{WXh}_# |wzIENDB`iptux-0.6.3/desktop/hicolor/48x48/000077500000000000000000000000001257720006400166035ustar00rootroot00000000000000iptux-0.6.3/desktop/hicolor/48x48/apps/000077500000000000000000000000001257720006400175465ustar00rootroot00000000000000iptux-0.6.3/desktop/hicolor/48x48/apps/i-tux.png000077500000000000000000000106531257720006400213320ustar00rootroot00000000000000PNG  IHDR5-c#sBIT|dbIDAThyp՝?u%$IuXe#d6+mH'$H0KB[[e7 IR K*E6N 1GbmM-[uh9?gFl}U<{^ M۷ooشi^|A*t:UJQVZJu$BiI uns/իWكsA\]vk׮/=ÑpIUe}S@YUU̙LU$BQq`(4ضE21Nl4FO7'HǨ()&{;NZWP?OVڵ뮁ڒy-JyD"5B!XZc)eYh } t&cYGcҾo/S=]-_k=_z衇ks|ym|jj."K;<ʱaFSiIVˊUU,[HMY1%!Ҋ$xi:;/{~k3o$Õq(cr2Et4h8cؖJ)hZa0'fbQ#R^2gQ*+S__j=Ν;8 Ɩ7?lҫXxd'93aGLh= ! TJ32x}ͱSIME)ϤED@͡]]Z\3j~"6?Բ>]W^_<{R0 3@2ƶmAceMkOJϧ֤-d"m9sVn\flE4[^'~e55XzuOu2/KqW(ftt(vF)m|*0Fړ^o!y X>o6t H7`0[y-l`+hme"e'`p矼K;,fu[ TCTC̫ 8gl:F1qg9UTYFӊ;?rŝ;wveK>bJ-z\zaˢuCQS ` CJH@RJ ùO!`yl`1uiLCo}<>9'zx O0|_HI{Nl׮]? n;+:>:cUカ2LN3!43n\&kea:sGeJ)+ ":N_A"c,^%.joo#A=SzL5/Xt5XB244d"Y]ĆʲX}{ɴ2 Lk8x;>o*+?4w۶mkzwZ<֖+>##$IosB` 0NQ3ʂ={l2,D"ɻ1`LLIdbteCO>)(꿹u"5%G9vs|!b}47QʋN4ɌEl2EWtg9̷ɑAA.9sZ[3"mi3Pc.6wtt\w]wGştN#ɌM"7化F] NVyl9~GJ--BDF芎a )lAB8ϱۻX~oR2ûxG@=c 1Fٶ'G0r(w3) Kex{ Ik)%Je)PrF`=31&ߠ /8n}koF0H2cNqYP*lR4B`R4qFYϪW5RU$Hl=x2B!RB9K/NT.iׂ,[uV -J(0orrt,Uq"D&:(hvd%\%@"uLhm @}lm[|ݶE4uIy: B)'j. wFI`: z'ێt= F pʹW@04ib*ϏP7k,0BO+F_>0S{< ,c)~95zjU^P#A+3IeI1G_,h@-9t* D!ipz.l3lNkzbM7Cػl9,E80:o{GL3-N&R<{l11O tئI""b#XBb `2:wk,2ox x^;_[;,1'wV}lEWnpޚʲH6 $W# {w}xߎ͟{FpϽ/sYK+HG*I+!]8?nGEsS,(b<v8|S_'ۇƾ<Ԯ#tZc5-q}@Qpw"‘ǔkdc4mV~ǁqWvVo~7n8x^EI\gBZL֚\g'}I2~-V^v_ǛbԵݻwWlڴg)9DIB0ce]vs;VضڿʆӾS<}wt)`>q_eֻb(YR,O_e5"dxDVRX4DL铝<>n݋6l2Ae͛7>Ei柴 (W^YY,.)QeVL*;E&v 12,C覰]'~|PKKKwWF;vhy~e {ƻ0k:'8ͬ2jk T2w>7ڱ5kְ~%KK 6s'IENDB`iptux-0.6.3/desktop/hicolor/48x48/apps/ip-tux.png000077500000000000000000000113771257720006400215160ustar00rootroot00000000000000PNG  IHDR5-c#sBIT|dIDATh{tU՝?{s77@BDPJZ(3Z:3ڥծjj-.TZQbQ EI In޹y>{8$κ{o~\<֖<3Z@vHR477E)PI䄘^VF[kn_|y۝wyA VX;hhh',B\鹺4/(`ʴiL(,$%R !̩D{zHAotw}7ԋ/X][[v zzcZkR>RhsLabj*1q!cl367S}E/{ J|O L^FQ\RZh?d ۶JҨWJBiGJ&f{HYHCh fyW:+`՗fakJyۭny}nP۷o_[~m{krJ.맳g" %, Tmrl!e9]XΒeaH֚Eݙ^ gJyX8s2Y´R,72cz{_~?ӑFz޼ܒRzii릧+QqAٚO[+?|xao=AJ&a"Z8ϋ5[ a;|G:2 ߼y3K.]:0֍Jh;aZ+|:f|kH)(GhCkM_,>KP(.aGU3's՘eU5}!V:|05M*i!DJ0$!3Ga d|.k,.Dn/so_mGm l !:{6ene;T__?Q3iYkoG{hm颷>gBJ!R.yYLh`0R )E湞!xquZA ~Zyڵ|LPjuw\mz#?*`pI @,OOKp5EٱX"# x f\s#]xvܹΊv~Tdf菎.BA,cMgZkl-{lu}Jk:,WJ( f)lIW_ N3jhoߪl=J.?#Cu1:|ICk7R3R)w,¿o}&iyFx`%$mK*bf> }e3@ss7ʯܩIZC4a\Ҫpk QJ:31 ,/s-J]S$WP7=8:|1nf^$3Odaa-P>g\R2K`#\Ӏr>d=Dg/m1hce$|HZ: 1ή>: } P[[zxy] d$B $% >iK Np5USYS5,HY60m` t),6ִmQhZv-Nr?y {%~ANv|{Ji(4D pN@FAXL)5ʆRn_m "ipr1yLaÅ3c= I -^$k(,9Dk޼5vFܼ#R:VtF&R%i0!򍙬Ç2oh0%~R s˖-܂+,K-J(^; \Y<;F^ls2b-V 7D 3y%R,+/"bD>d3%7 ( FkMg,wc0$15l1αNbR PVZ>xL3/v\38iE*5"pGŘ+%Ma~QPR<Ǻ]sBHRb+5HrE:;LO&L(AL6١FE8)Z SH:㊦UIJ \bGZx$'ˤ(䧢 Ӌ6.BS=(;> X)}^fM,v SH)a6R%X]1 q. 5umi6yVWrdZzctx I\3g 1)v)X`:J , )J@4sgbZ QRdܠ\mW Y[QLgrZ}rS)+ˋ1 +3Dzcx9Seta^)[?9Nc[0BmdR:$r-Rt9/F9fB )]Ή 0MϙĔp֘q4lmh⓶>ed{Mۢ<]LǼ4N`FAY87"E/ CKs'p6`vv"[9}6Ӑe۸E upPD0$wUS: 5t1 _Ʉom?iaF;^/>(O2M:¡OOP6h9X7vC 2' Qo\59 cZV ڙET3sz I'' j*S|ɡ(2#J)I?JVvpwז 6|dLfL4ZP9>SǓew7׎CJWe(Blqk6um=.V\RC".DŽēCiPB Eۑx(o&8y/iK44SC>,&=i>h!/ ??i񓽍\UVH7̙D|/?<HIPh3t?zK~dɒsώܖ0N% S}H ՅZR0 nS̤P)[Ӷ>Nav~Ǡ/M]tV@h,D?P,T(ܪoU; LCuuu^2y,Щ ZPx !ڗR8vrLqy&]o*4Q ]ZPj FaM)+Z~555 FdZjK;^gN3aR[6qmݪvNwlIɀ0& /MA[,!Ʃ=y닃MkoXac63k.xkT+d3VKk Izig O A/IpI(Z0Uׯ[|16Y׭['~<`0 м#5'ur?XZckҊk(mD"xW.~k7=hѢ1A}ά.^NK~`w!e0 s` w\QirA^y믿)IN-Kg/*3ȸHP8`%IvDЭmjdZ=`^ջ˖-u] sJ[~ yէ  'cp>d="Ja!Aw ^q"owϙ3穿۶m+۵kW+[r]7 -hn&HY[e;!qy̫(}eVBl"#Ya@Ņ VHUĂ H(gAZU\8ܧ}zy&j9R<:OHɽH gyx~t?op.$P&W " R.TSd ly|B" I>ةآ(G$@`UR,@".Y2GvX@`B, 8C L0ҿ_pH˕͗K3w!lBa)f "#HL 8?flŢko">!N_puk[Vh]3 Z zy8@P< %b0>3o~@zq@qanvRB1n#Dž)4\,XP"MyRD!ɕ2 w ONl~Xv@~- g42y@+͗\LD*A aD@ $<B AT:18 \p` Aa!:b""aH4 Q"rBj]H#-r9\@ 2G1Qu@Ơst4]k=Kut}c1fa\E`X&cX5V5cX7va$^lGXLXC%#W 1'"O%zxb:XF&!!%^'_H$ɒN !%2I IkHH-S>iL&m O:ňL $RJ5e?2BQͩ:ZImvP/S4u%͛Cˤ-Кigih/t ݃EЗkw Hb(k{/LӗT02goUX**|:V~TUsU?y TU^V}FUP թU6RwRPQ__c FHTc!2eXBrV,kMb[Lvv/{LSCsfffqƱ9ٜJ! {--?-jf~7zھbrup@,:m:u 6Qu>cy Gm7046l18c̐ckihhI'&g5x>fob4ekVyVV׬I\,mWlPW :˶vm))Sn1 9a%m;t;|rtuvlp4éĩWggs5KvSmnz˕ҵܭm=}M.]=AXq㝧/^v^Y^O&0m[{`:>=e>>z"=#~~~;yN`k5/ >B Yroc3g,Z0&L~oL̶Gli})*2.QStqt,֬Yg񏩌;jrvgjlRlc웸xEt$ =sl3Ttcܢ˞w|/9%bKGD pHYs.#.#x?vtIME+۩7GIDATx͛{ՕǿVuσy0ga!2l.뢫YD&F&*$d6슉(#bbQ0 0WݻTuuWw`1ԧ;ZkRCݸwދ{y477'RJR|>&L@AA?^YYY2b_AAAq ̡C׮]nݺkkkkvXX4|La1%21 AYQho ph=?k9}lqGO^zrqܹ5kLo84wgOb4KGCsQƺ:jw͛+K e}z73gǎ0P˗O^||qE5N6W`PA>AD&Q#DQ O&>S;K86m`߲͊kz>'r`y˗/pѢEZY.uLJP?a'C]S+ M9HK{]PwP8Z3A/?a2e15!$ t]]k{g=]c,//òexGf!pF_5Z)Z;{h sX.(hR gC}#G cRPf|m4c $SN47?`Y…n lܸq*9{s!RК;ZmUxіw때)쇥4](= wC־f%\QJqw^U-<OEpGteY*6@iG {p&ߟ5nG`ſ{woZp|>^gجi  ϲ%m۶&2wl\~Z:a>WG'`{QJ%(frfQ0{Ͻs[ߓYpsVi]=ڻB:CvY|}ڮ]6|>y.lYrS߶eCEXZX0RJw)DH{c Oͮ:mP}c*>;e [^Œg_H[ҔHtyB ,;T3w_]N0- Iz|HzPR )E!R2?}dA|dpZZ:XB`)1MfS~_رci|M[~y,Bfd%!E}s$ba7 iJLao_}}sςDUV=/^K3p0Jk:z?$pһ J} >70޼`ؽ>YPYcҐy?QA͛7g|[c.]8}Q9Ќ bh2B !R txb} G@ާ<ڎKऺU8fH$oc'5+pyiYP P@TkgzI TLҧg`+ <+bU^ ߇Gg]A;´wW︺a'{/***:`&_G=рҚ7dMJ@!OTʾkHRl̹%)Gߠ+6vh}D=H[&i-"^vug_Ń3AA_f͚o<9x`!&;X RcNQZz&9A:q\?k*a{hdPua… ;O!'@}4adb#/eIH{PH&1cї )p( R1:hCN 6$ES.d˿ øfnހ%#60]$$%Rc\\V̱gP6 ;Ѥ#OC)ǫ9~L4M +!dfOںuk ?}ŵuG3q(?ҏ}Q)eJ!і3WY~GBBmecgoRG'3NXGYQzk|&ibf;|֭[-YY"9Ǖ& .9RSu)$vrOOnJYHI{#i2% @8A8whXrW6eg:aH@I#H`:j61tlluء\;nI)~G6b8#p"16%G8smY#'L,"^z饧g\ RyX #gԤ[n$|P>w^4!N.6}rP$m=MdD: @ 7~ddddkkkm& 2^c 0e58յ)^RJ 2x)d'oH t7v爹`/eD"8'x蛃aD@e3+7o~yª3Fh_D~y5 ZCd3-3}&?>,IAXG7=~@*:\Hp< QBڬ1$gfM$؅ZO:\{~&Cإj m҈s& {g)@O޶HdO";I Bc9d'&]ǏPVVܹs9!vFRX-B%R)Qƙl?|]<[fxŤWK%3f|:!X4f8Zh)l 52zu}4v" 3'5KA|k҈SZmws2vJ}{7%CXh"h`t|%%%p8OrP)RֶK\v+M? /MԳlñP8B]-SULj ?g, im(ʔS*9{3c3hE?^ge4IhW>o~o=CU9`.% T8V)P3G٣&)alȹ pj%AÎ(Zj88tjD1Ip*sJP tF+';R bRr& v,š_N0 @EnxR$$U:!Mզҁ\=rЩD-~V-띸! P7 +X*OV23Y9)-)?O6Ϛ5D zXlI?9HRJf1{li%W9¡n[вEoqb[2A` 7+_3fl8p`@w}qO>qj!(q9duͼQ}t!d Gy2)Ť3"#"(pԽaܹkݸSYY8,:N80z#ƦDp|wM.&42Pk(²]ݒC%iD@& A aK݆%(0<LU•W^Ngޯi."QUÉLWRک}Θ!>` 4Dzr!ITib3(iڵM;jKO9Yn;c$Q__]ɨƇD9=ը3li0$uݠ6%yQ#ojsʙ'Y^ &ibM(AgR1ַzkYXXj\jsFy77%1'Z~@9=GM\D(\SJJ9a]ka7Є|~߼vRpZ *km\BP?b񳝇Nu4.L) e|SEKIOv6|X; % * [ixq g.immRXVW9SkqARdҝy66#qDwZ-z'b@?Δv̶ m+FE"pđTWW.sv;Fn5Q4pb ex c=av`[k4 s:WZ)tJIy'K8c)W.aneƍ"''KjkkY 'O gJzŔ[9vją=$so#hG.i5NXϫՏ iy֯_?lҤI .jO}`ʥ-]ah'\I)m=Gj !ːLC^75=7 ف]),h`i{ k,WnXmϙ[/99]&m|$>:~5]ʼn``KUF햦GiB"ZAqf4SOAiw܄$KZE98 ۅ5x7_|-[Jپ} ^~ewoxU\qv6';XJ;kj^ki~siQB$׎J%dDM¹b'B( E_͋/o,Dz,͛WKϺUe)=.K {!1$K+M$C@J!Q[_#8fɒ%>ȵbŊsowC__2{ω߼ '#$28[<;Jk,'&YJ.;b+V|R0f䣝D_LO}ēO\rW7 !"^2;T͟?~gp7J,c14 `[T\Pr'* C ?C 3GfBm-?!w7ښgQ믿uه,_a@ Pꫯk޽{#G /*!##aHՁRQ" O?hp@ H)+jkk,'7##㥬,Lr#FX|ĺXxOIENDB`iptux-0.6.3/desktop/hicolor/64x64/apps/ip-tux.png000077500000000000000000000216661257720006400215140ustar00rootroot00000000000000PNG  IHDRF;ƒ CiCCPICC profilexڝSwX>eVBl"#Ya@Ņ VHUĂ H(gAZU\8ܧ}zy&j9R<:OHɽH gyx~t?op.$P&W " R.TSd ly|B" I>ةآ(G$@`UR,@".Y2GvX@`B, 8C L0ҿ_pH˕͗K3w!lBa)f "#HL 8?flŢko">!N_puk[Vh]3 Z zy8@P< %b0>3o~@zq@qanvRB1n#Dž)4\,XP"MyRD!ɕ2 w ONl~Xv@~- g42y@+͗\LD*A aD@ $<B AT:18 \p` Aa!:b""aH4 Q"rBj]H#-r9\@ 2G1Qu@Ơst4]k=Kut}c1fa\E`X&cX5V5cX7va$^lGXLXC%#W 1'"O%zxb:XF&!!%^'_H$ɒN !%2I IkHH-S>iL&m O:ňL $RJ5e?2BQͩ:ZImvP/S4u%͛Cˤ-Кigih/t ݃EЗkw Hb(k{/LӗT02goUX**|:V~TUsU?y TU^V}FUP թU6RwRPQ__c FHTc!2eXBrV,kMb[Lvv/{LSCsfffqƱ9ٜJ! {--?-jf~7zھbrup@,:m:u 6Qu>cy Gm7046l18c̐ckihhI'&g5x>fob4ekVyVV׬I\,mWlPW :˶vm))Sn1 9a%m;t;|rtuvlp4éĩWggs5KvSmnz˕ҵܭm=}M.]=AXq㝧/^v^Y^O&0m[{`:>=e>>z"=#~~~;yN`k5/ >B Yroc3g,Z0&L~oL̶Gli})*2.QStqt,֬Yg񏩌;jrvgjlRlc웸xEt$ =sl3Ttcܢ˞w|/9%bKGD pHYs.#.#x?vtIME)IDATx՛y|TUǿZ!@êHM@iqpoZG[[{GQ[Gn7VpkYDh($$’JBRۻwx^K KSzursZk^թ֭[e ןm۶@ ) 5 @a geeuY;  J$0[.w۷oRy=oՇ>}(,'c6sn448њj)_b_鱃U-gt˭=zΉ'^xLYY_f՗~sgN=iM7drIzECD)jl~6f;om/2y]w]ӧRF)ŪUz>bæR{?]ccDzV\2kpԤ%j"@p4T?^CYb(ع˗sp뭷2w\ Lss3K.w=t_Ϟ~e}&hGrhUuTXS 'D&hp(֚4t/ݲЭ3C{#; C0 Zs%ĺ5kx9d.\ΫobA 0i/fϟ?I-/9{΍.axP&-(NP]w'ii RJŮ?;A`4 Df%ׯߡ0۷o7|/TV_2G?7x%x<> 4'(;x#G1MӺpAf ۦ#ks:r"x&R|h&xC+^x^{킿0`{w#- lS|i1&:Z.p&uXFl2^ukVZB.Rqp2\?ln|>ဣ5DѼrr?{~޽;ꫯUft8 !4P8) npVIzs3֣+lSj˧xmTm q}p3GFc"z>^x|c`^xzmKOc𦦃7PvFkJ-(E\%n9 fr#QS>sv8f? (۽"JrbƌK/$<wfѢE?s/~ˀg Tl7QJYBeR5Gm쯞_3>|.S]NFJ Nl/-wOfװhѢ6'4ӞTk#/yt =`TU!Hۓr>O[WM@o'G;7~FTꨩodhsL@eq(W?gЀfQQd{@,c/ѵh4|Yv`C3RJΧH-'R6\WVa=sv筭x8dlH#5t8?OUTTFq_bD}P@ _h b囀nHɰ.]`"60n SG_V!瑤y%E]A2o޼ … iɳ\Y@i<P ~K)l =@0@ vW]z'ҚG_Os$F3)IG2 ywfn޼iyϼvOЩw_Li G9e ERqYHC'kP"/nD;@ 1x%ݺ3p-Z46ֻz&Z JS[s aI-Sֵ$Z͓[vAY7wp_U[-:n[pּ]BS$ rk]u3m:O?4*E"f̘OaFKh m %mD┑(ak5o<n_OJk7>6%e59c*O QЕ:E(Š7ǧNhc~=qux3PZhqH}+Xu([/crR|L)yڑPbzJջS XV:qtvtB)By}UodC/XiUaKYh $RJK檔BJPJ$Hiłm~1 `mQHݬ`~ŋ%{xVڧEI-;bKXc3Tאt~.[l߾fuq=ŠBMAt )nteF"']I)Q@L?ChSmG8~2:3g)XH) g")8p@ixc<ȴ4rF{`3-_~?-} xT[)e! T),6tNqC׷2·&K?,e/0mwM\JKn3&($wHCJ ]̺uazOyFdp2qh,U(V @y n;GHPl ¹7N"VxW3HITWWAd#fϱfH(E| aX88Cu !?qy_u&O JkҧuC!lh^xoZp+rIZ 9!U]"[aㄬFs=&ZjPm,)%Z)+ @"Eٹ4$)>?/<|ap$ѿqs{kBmyb߮RЎ3ZBScE7+4 4B PHz+e0^g ul .$\ĝ$0A~s `;epEm8%>Xc+Y*VZwIN ۝>x^<%%%:u&p؆uÅ*P*xhVILk|v?X_Xu1~^+ i -FX(Qͱ >FH2˘yŴ}}UČA\nӟ.i/64h#`*0S|QC-1Qץ1P6Ob4ZٱcǞ̼=Zq1PLu}mQgMȉwv9sFy%jrכۉ긫zt⌬4gt\^4PywKX>*7'n_Nrbc z呞Jj˝x< _³wMWOǢX!.6A!}s']Yme?R1G5mX@LnS5]J[4 QJ3tXL  Rf; 3,s1S[N$D<vLaم"ۭxA"/eZ*pC3^W/#{w(>86òpn (`QRP,e|v PW+[l{@Z(P9ŕ'q)>S@jhfɎJ-neZbty .bD/LHdxʥ{{{K!JmUNRȎG,?']Rec1֕9 @1ɰ'EfVQ>v:gҷs[[ay{;-QdZJvh/oZ**#x\T[ε^3wM0ӦM{nޝ3Y[QZ јZc$TX] ;o(vB3hfe ;8<Δ>L*̥kcAuY'UG֚c@y|+8??m?WWkLVOAA^ݻ.‰tct!`pkZse4M8}ӸzHC<)ҬWڽd &' E[|&ٵ&bHH[Ș-V?O=.]ԹYf yiSLϺ dlכG) 8s &$K)({5Q^LDxi9bfDE` PZ`jUO2 5kVm$9s}"S.t,]IJX;T2`78e ȟx(A*yNPƕ -,U''@VG'RR(aa8E^#O~wk׮k[>C W>;U1rn|25y a4(%l*Bi[]U@oWMH.DS8ʖ'FW)ijDŽQŽ8Jٟ[hF'K6?{7,..9.Y~{AIaD`\i_JVZM\E[UcT)>Z),YZx ǥAɠ_ePVXjFMp9WpҤIvfٳqo4F(05Bb<Vkű QZXqC{$-J2k\khEGkW7^ .邅״lٲ+>zE9KG&1 DL*AX@wJ#R)FK aSni6Cp>_4].BOFǞ8TVVǚfSU&NTu eGISChaٷOnS\rJΝq)z g]pۜk6mUӘ#ZdtRumrv-(vʐv>$#6wbbӞis 𔥏rhk<El ZMxE];z޼y g855{{Z[=ˋ~ほzL9ۄޣBVT|ʱ]82]\E"B}@5z=S&_OrKpʔ)Ma|u~'LdƍO=Ttڵ܂K;9N5b$ ]LPڶ&WSi"QPܾeSt=7k֬oᆆ=zw|}o6o7~Gعs4"kYxz4Ms+&l!3"BeU rW\tE'u$d޾}=z4PRRҿp8D:(ЫW/rrr83Sx = VQޞR5IENDB`iptux-0.6.3/desktop/iptux.desktop000077500000000000000000000015371257720006400171220ustar00rootroot00000000000000[Desktop Entry] Name=iptux Name[zh_CN]=信使(iptux) Name[zh_HK]=信使(iptux) Name[zh_TW]=信使(iptux) Name[es]=iptux Comment=LAN communication software Comment[zh_CN]=局域网通讯工具 Comment[zh_HK]=LAN 通訊工具 Comment[zh_TW]=區域網路通訊工具 Comment[es]=Software de comunicación para red local Keywords=iptux Keywords[zh_CN]=chat;talk;im;message;聊天;消息;即时通讯;飞鸽传书;飛鴿傳書;ipmsg;feige; Keywords[zh_HK]=chat;talk;im;message;聊天;訊息;即時通;飛鴿傳書;飞鸽传书;ipmsg;feige; Keywords[zh_TW]=chat;talk;im;message;聊天;訊息;即時通;飛鴿傳書;飞鸽传书;ipmsg;feige; Keywords[es]=chat;hablar;im;mensajería instantánea;mensaje;talk;message;ipmsg;feige;飞鸽传书;飛鴿傳書; Exec=iptux Terminal=false Type=Application Icon=ip-tux StartupNotify=true Categories=GTK;Network;InstantMessaging; iptux-0.6.3/homebrew/000077500000000000000000000000001257720006400145045ustar00rootroot00000000000000iptux-0.6.3/homebrew/iptux.rb000066400000000000000000000011461257720006400162040ustar00rootroot00000000000000require 'formula' class Iptux < Formula homepage 'https://github.com/iptux-src/iptux' url 'https://github.com/iptux-src/iptux/archive/v0.6.1.tar.gz' sha1 '634c7e613bb83a18dfaaf6fc965202a390790921' depends_on :x11 depends_on 'gettext' depends_on 'gtk+' depends_on 'gconf' depends_on 'hicolor-icon-theme' depends_on 'pkg-config' => :build def install system "./configure", "--disable-debug", "--disable-dependency-tracking", "--disable-silent-rules", "--prefix=#{prefix}" system "make", "install" end end iptux-0.6.3/install-sh000077500000000000000000000332551257720006400147100ustar00rootroot00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: iptux-0.6.3/ltmain.sh000077500000000000000000005440611257720006400145310ustar00rootroot00000000000000# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit 1 fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" ##################################### # Shell function definitions: # This seems to be the best place for them # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. win32_libid () { win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ grep -E 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` if test "X$win32_nmres" = "Ximport" ; then win32_libid_type="x86 archive import" else win32_libid_type="x86 archive static" fi fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $echo $win32_libid_type } # End of Shell function definitions ##################################### # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; tag) tagname="$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 exit 1 ;; esac case $tagname in CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. ;; *) if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi ;; esac ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" $echo $echo "Copyright (C) 2003 Free Software Foundation, Inc." $echo "This is free software; see the source for copying conditions. There is NO" $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit 0 ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 # Now print the configurations for the tags. for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0" done exit 0 ;; --debug) $echo "$progname: enabling shell trace mode" set -x ;; --dry-run | -n) run=: ;; --features) $echo "host: $host" if test "$build_libtool_libs" = yes; then $echo "enable shared libraries" else $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then $echo "enable static libraries" else $echo "disable static libraries" fi exit 0 ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: ;; --tag) prevopt="--tag" prev=tag ;; --tag=*) set tag "$optarg" ${1+"$@"} shift prev=tag ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit 1 ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit 1 fi # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit 1 fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_output= arg_mode=normal libobj= for arg do case "$arg_mode" in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit 1 fi arg_mode=target continue ;; -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" exit 1 ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit 1 ;; *) # Get the name of the library object. [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSifmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.ii) xform=ii ;; *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.f90) xform=f90 ;; *.for) xform=for ;; *.java) xform=java ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit 1 ;; esac # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. if test -n "$available_tags" && test -z "$tagname"; then case $base_compile in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" case "$base_compile " in "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit 1 # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else xdir=$xdir/ fi lobj=${xdir}$objdir/$objname if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit 1 fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi $run $rm $removelist trap "$run $rm $removelist; exit 1" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit 1" 1 2 15 else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $run ln "$0" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit 1 fi $echo $srcfile > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi $run $rm "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit 1 fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then $show "$mv $output_obj $lobj" if $run $mv $output_obj $lobj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit 1 fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi fi build_libtool_libs=no build_old_libs=yes prefer_static_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" base_compile="$base_compile $arg" shift case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit 1 fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat $save_arg` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit 1 fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit 1 else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi done else $echo "$modename: link input file \`$save_arg' does not exist" exit 1 fi arg=$save_arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit 1 ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: more than one -exported-symbols argument is not allowed" exit 1 fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 exit 1 fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-freebsd*-gnu*) # prevent being parsed by the freebsd regexp below ;; *-*-mingw* | *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-freebsd*-gnu*) # prevent being parsed by the freebsd regexp below ;; *-*-openbsd*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -module) module=yes continue ;; # gcc -m* arguments should be passed to the linker via $compiler_flags # in order to pass architecture information to the linker # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo # but this is not reliable with gcc because gcc may use -mfoo to # select a different linker, different libraries, etc, while # -Wl,-mfoo simply passes -mfoo to the linker. -m*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" if test "$with_gcc" = "yes" ; then compiler_flags="$compiler_flags $arg" fi continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # The PATH hackery in wrapper scripts is required on Windows # in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit 1 ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac add_flags="$add_flags $arg" ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit 1 fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit 1 else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac add_flags="$add_flags $arg" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit 1 fi # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base link # command doesn't match the default compiler. if test -n "$available_tags" && test -z "$tagname"; then case $base_compile in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" case $base_compile in "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) # The compiler in $compile_command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit 1 # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir status=$? if test "$status" -ne 0 && test ! -d "$output_objdir"; then exit $status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit 1 ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplcations in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) duplicate_compiler_generated_deps=$duplicate_deps ;; esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if test "X$duplicate_deps" = "Xyes" ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit 1 ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi if test "$pass" = conv && test "$allow_undefined" = yes; then deplibs="$deplib $deplibs" continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do for search_ext in .la $shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) if test "$deplibs_check_method" != pass_all; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because the file extensions .$libext of this argument makes me believe" $echo "*** that it is just a static archive that I should not used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib'" 1>&2 exit 1 fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit 1 fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" tmp_libs= for deplib in $dependency_libs; do #echo "Adding $deplib to \$deplibs" deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit 1 fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit 1 fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit 1 fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit 1 fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit 1 fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var"; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $dir" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi # This is a shared library # Warn about portability, can't link against -module's on some systems (darwin) if test "$shouldnotlink" = yes && test "$pass" = link ; then $echo if test "$linkmode" = prog; then $echo "*** Warning: Linking the executable $output against the loadable module" else $echo "*** Warning: Linking the shared library $output against the loadable module" fi $echo "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; shift libname=`eval \\$echo \"$libname_spec\"` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`$echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' eval cmds=\"$extract_expsyms_cmds\" for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' eval cmds=\"$old_archive_from_expsyms_cmds\" for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5* ) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against it, someone # is ignoring the new warnings I added if /usr/bin/file -L $add 2> /dev/null | grep "bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo $echo "** And there doesn't seem to be a static archive available" $echo "** The link will probably fail, sorry" else add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case "$libdir" in [\\/]*) add_dir="-L$inst_prefix_dir$libdir $add_dir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit 1 fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case "$libdir" in [\\/]*) add_dir="-L$inst_prefix_dir$libdir $add_dir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $echo $echo "*** Warning: This system can not link to static lib archive $lib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $echo "*** But as you try to build a module library, libtool will still create " $echo "*** a static module, that should work as long as the dlopening application" $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else convenience="$convenience $dir/$old_library" old_convenience="$old_convenience $dir/$old_library" deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then #if test -n "$dependency_libs" && # { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || # test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" #fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit 1 fi if test "$absdir" != "$libdir"; then # Sure, some shells/systems don't implement the -ef. # Those will have to live with the warning. test "$absdir" -ef "$libdir" > /dev/null 2>&1 || $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, but need to link against shared eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac path="" fi ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$deplibs $depdepl" ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$deplibs $path" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit 1 fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit 1 else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit 1 fi # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$2" number_minor="$3" number_revision="$4" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) current=`expr $number_major + $number_minor - 1` age="$number_minor" revision="$number_minor" ;; esac ;; no) current="$2" revision="$3" age="$4" ;; esac # Check that each of the things are valid numbers. case $current in 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 ;; esac case $revision in 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 ;; esac case $age in 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) major=`expr $current - $age + 1` case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit 1 ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$echo "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) removelist="$removelist $p" ;; *) ;; esac done if test -n "$removelist"; then $show "${rm}r $removelist" $run ${rm}r $removelist fi fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. for path in $notinst_path; do lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'` deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if true || test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-freebsd*-gnu*) # Prevent $arg from being parsed by the freebsd regexp below. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; *-*-openbsd* | *-*-freebsd*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for file magic test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a file magic. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name="`expr $a_deplib : '-l\(.*\)'`" # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval \\$echo \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval $echo \"$potent_lib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for regex pattern test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a regex pattern. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` done fi if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ | grep . >/dev/null; then $echo if test "X$deplibs_check_method" = "Xnone"; then $echo "*** Warning: inter-library dependencies are not supported in this platform." else $echo "*** Warning: inter-library dependencies are not known to be supported." fi $echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $echo $echo "*** Warning: libtool could not satisfy all declared inter-library" $echo "*** dependencies of module $libname. Therefore, libtool will create" $echo "*** a static module, that should work as long as the dlopening" $echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $echo "*** The inter-library dependencies that have been dropped here will be" $echo "*** automatically added whenever a program is linked with this library" $echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $echo $echo "*** Since this library must not contain undefined symbols," $echo "*** because either the platform does not support them or" $echo "*** it was explicitly requested with -no-undefined," $echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && test "$fast_install" = no && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext\" eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols eval cmds=\"$export_symbols_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" $run eval "$cmd" || exit $? skipped_export=false else # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: fi done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" status=$? if test "$status" -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" for xlib in $convenience; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "$mkdir $xdir" $run $mkdir "$xdir" status=$? if test "$status" -ne 0 && test ! -d "$xdir"; then exit $status fi # We will extract separately just the conflicting names and we will no # longer touch any unique names. It is faster to leave these extract # automatically by $AR in one run. $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 $AR t "$xabs" | sort | uniq -cd | while read -r count name do i=1 while test "$i" -le "$count" do # Put our $i before any first dot (extension) # Never overwrite any file name_to="$name" while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" do name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` done $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? i=`expr $i + 1` done done fi libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Add all flags from the command line. We here create a library, # but those flags were only added to compile_command and # finalize_command, which are only used when creating executables. # So do it by hand here. compiler_flags="$compiler_flags $add_flags" # Only add it to commands which use CC, instead of LD, i.e. # only to $compiler_flags #linker_flags="$linker_flags $add_flags" # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval cmds=\"$module_expsym_cmds\" else eval cmds=\"$module_cmds\" fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval cmds=\"$archive_expsym_cmds\" else eval cmds=\"$archive_cmds\" fi fi if test "X$skipped_export" != "X:" && len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise. $echo "creating reloadable object files..." # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= delfiles= last_robj= k=1 output=$output_objdir/$save_output-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || { len=`expr "X$test_cmds" : ".*"` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" fi last_robj=$output_objdir/$save_output-${k}.$objext k=`expr $k + 1` output=$output_objdir/$save_output-${k}.$objext objlist=$obj len=1 fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi # Set up a command to remove the reloadale object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" done $echo "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval cmds=\"$archive_expsym_cmds\" else eval cmds=\"$archive_cmds\" fi # Append the command to remove the reloadable object files # to the just-reset $cmds. eval cmds=\"\$cmds~$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? exit 0 fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit 1 fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" else gentop="$output_objdir/${obj}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" status=$? if test "$status" -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" for xlib in $convenience; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "$mkdir $xdir" $run $mkdir "$xdir" status=$? if test "$status" -ne 0 && test ! -d "$xdir"; then exit $status fi # We will extract separately just the conflicting names and we will no # longer touch any unique names. It is faster to leave these extract # automatically by $AR in one run. $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 $AR t "$xabs" | sort | uniq -cd | while read -r count name do i=1 while test "$i" -le "$count" do # Put our $i before any first dot (extension) # Never overwrite any file name_to="$name" while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" do name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` done $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? i=`expr $i + 1` done done fi reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" eval cmds=\"$reload_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit 0 fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $run eval "echo timestamp > $libobj" || exit $? exit 0 fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" eval cmds=\"$reload_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit 0 ;; prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors if test "$tagname" = CXX ; then compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" fi ;; esac compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$output.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' else $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval '$echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else $echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit 1 ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi # AIX runtime linking requires linking programs with -Wl,-brtl and libs with -Wl,-G # Also add -bnolibpath to the beginning of the link line, to clear the hardcoded runpath. # Otherwise, things like the -L path to libgcc.a are accidentally hardcoded by ld. # This does not apply on AIX for ia64, which uses a SysV linker. case "$host" in ia64-*-aix5*) ;; *-*-aix4* | *-*-aix5*) compile_command=`$echo "X$compile_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"` finalize_command=`$echo "X$finalize_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"` ;; esac if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit 0 fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $0 --fallback-echo"; then case $0 in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; *) qecho="$SHELL `pwd`/$0 --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) cwrappersource=`$echo ${objdir}/lt-${output}.c` cwrapper=`$echo ${output}.exe` $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef DIR_SEPARATOR #define DIR_SEPARATOR '/' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) #define HAVE_DOS_BASED_FILE_SYSTEM #ifndef DIR_SEPARATOR_2 #define DIR_SEPARATOR_2 '\\' #endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); char * basename (const char *name); char * fnqualify(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); int main (int argc, char *argv[]) { char **newargz; int i; program_name = (char *) xstrdup ((char *) basename (argv[0])); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = fnqualify(argv[0]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" } void * xmalloc (size_t num) { void * p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL ; } char * basename (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha (name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return (char *) base; } char * fnqualify(const char *path) { size_t size; char *p; char tmp[LT_PATHMAX + 1]; assert(path != NULL); /* Is it qualified already? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha (path[0]) && path[1] == ':') return xstrdup (path); #endif if (IS_DIR_SEPARATOR (path[0])) return xstrdup (path); /* prepend the current directory */ /* doesn't handle '~' */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ p = XMALLOC(char, size); sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); return p; } char * strendzap(char *str, const char *pat) { size_t len, patlen; assert(str != NULL); assert(pat != NULL); len = strlen(str); patlen = strlen(pat); if (patlen <= len) { str += len - patlen; if (strcmp(str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char * mode, const char * message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } EOF # we should really use a build-platform specific compiler # here, but OTOH, the wrappers (shell script and this C one) # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. $run $LTCC -s -o $cwrapper $cwrappersource ;; esac $rm $output trap "$rm $output; exit 1" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $echo >> $output "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" $echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" exit 1 fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else $echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \$progdir\\\\\$program \${1+\"\$@\"} " ;; *) $echo >> $output "\ exec \$progdir/\$program \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" exit 1 fi else # The program doesn't exist. \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " chmod +x $output fi exit 0 ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" status=$? if test "$status" -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" # Add in members from convenience archives. for xlib in $addlibs; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "$mkdir $xdir" $run $mkdir "$xdir" status=$? if test "$status" -ne 0 && test ! -d "$xdir"; then exit $status fi # We will extract separately just the conflicting names and we will no # longer touch any unique names. It is faster to leave these extract # automatically by $AR in one run. $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 $AR t "$xabs" | sort | uniq -cd | while read -r count name do i=1 while test "$i" -le "$count" do # Put our $i before any first dot (extension) # Never overwrite any file name_to="$name" while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" do name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` done $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? i=`expr $i + 1` done done fi oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` done fi compiler_flags="$compiler_flags $add_flags" # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then eval cmds=\"$old_archive_from_new_cmds\" else eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # the command line is too long to link in one step, link in parts $echo "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs # GNU ar 2.10+ was changed to match POSIX; thus no paths are # encoded into archives. This makes 'ar r' malfunction in # this piecewise linking case whenever conflicting object # names appear in distinct ar calls; check, warn and compensate. if (for obj in $save_oldobjs do $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2 $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2 AR_FLAGS=cq fi # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done for obj in $save_oldobjs do oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" if len=`expr "X$test_cmds" : ".*"` && test "$len" -le "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~$old_archive_cmds\" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit 1 fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit 1 fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit 1 fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes && test "$fast_install" = no; then $echo >> $output "\ relink_command=\"$relink_command\"" fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit 0 ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg="$nonopt" fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest="$arg" continue fi case $arg in -d) isdir=yes ;; -f) prev="-f" ;; -g) prev="-g" ;; -m) prev="-m" ;; -o) prev="-o" ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest="$arg" continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit 1 fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit 1 fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit 1 fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit 1 fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit 1 ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit 1 fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 exit 1 fi if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 exit 1 fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" eval cmds=\"$postinstall_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit 1 ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit 0 ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then file=`$echo $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # To insure that "foo" is sourced, and not "foo.exe", # finese the cygwin/MSYS system by explicitly sourcing "foo." # which disallows the automatic-append-.exe behavior. case $build in *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; *) wrapperdot=${wrapper} ;; esac # If there is no directory component, then add one. case $file in */* | *\\*) . ${wrapperdot} ;; *) . ./${wrapperdot} ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit 1 fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # To insure that "foo" is sourced, and not "foo.exe", # finese the cygwin/MSYS system by explicitly sourcing "foo." # which disallows the automatic-append-.exe behavior. case $build in *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; *) wrapperdot=${wrapper} ;; esac # If there is no directory component, then add one. case $file in */* | *\\*) . ${wrapperdot} ;; *) . ./${wrapperdot} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir="/tmp" test -n "$TMPDIR" && tmpdir="$TMPDIR" tmpdir="$tmpdir/libtool-$$" if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : else $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 continue fi file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyways case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. eval cmds=\"$old_postinstall_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $0 --finish$current_libdirs' else exit 0 fi ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. eval cmds=\"$finish_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. exit 0 $echo "----------------------------------------------------------------------" $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" done $echo $echo "If you ever happen to want to link against installed libraries" $echo "in a given directory, LIBDIR, you must either use libtool, and" $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" $echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" $echo " during execution" fi if test -n "$runpath_var"; then $echo " - add LIBDIR to the \`$runpath_var' environment variable" $echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "----------------------------------------------------------------------" exit 0 ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit 1 fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit 1 fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit 1 fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit 1 fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables if test "${save_LC_ALL+set}" = set; then LC_ALL="$save_LC_ALL"; export LC_ALL fi if test "${save_LANG+set}" = set; then LANG="$save_LANG"; export LANG fi # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $echo "$cmd$args" exit 0 fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" rm="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit 1 fi rmdirs= origobjdir="$objdir" for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if (test -L "$file") >/dev/null 2>&1 \ || (test -h "$file") >/dev/null 2>&1 \ || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" if test "$mode" = uninstall; then if test -n "$library_names"; then # Do each command in the postuninstall commands. eval cmds=\"$postuninstall_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. eval cmds=\"$old_postuninstall_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. fi fi ;; *.lo) # Possibly a libtool object, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file . $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" \ && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" \ && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$noexename # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit 1 ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit 1 fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit 1 fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE. Report bugs to ." exit 0 ;; clean) $echo \ "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit 1 ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." exit 0 # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: iptux-0.6.3/missing000077500000000000000000000153311257720006400142760ustar00rootroot00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2012-06-26.16; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'automa4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: iptux-0.6.3/mkinstalldirs000077500000000000000000000067221257720006400155110ustar00rootroot00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2009-04-28.21; # UTC # Original author: Noah Friedman # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' IFS=" "" $nl" errstatus=0 dirmode= usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. Report bugs to ." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit $? ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit $? ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and # mkdir -p a/c at the same time, both will detect that a is missing, # one will create a, then the other will try to create a and die with # a "File exists" error. This is a problem when calling mkinstalldirs # from a parallel make. We use --version in the probe to restrict # ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" else # On NextStep and OpenStep, the 'mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because '.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version fi ;; *) if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./--version "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac for file do case $file in /*) pathcomp=/ ;; *) pathcomp= ;; esac oIFS=$IFS IFS=/ set fnord $file shift IFS=$oIFS for d do test "x$d" = x && continue pathcomp=$pathcomp$d case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr= chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp=$pathcomp/ done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: iptux-0.6.3/pixmaps/000077500000000000000000000000001257720006400143555ustar00rootroot00000000000000iptux-0.6.3/pixmaps/Makefile.am000077500000000000000000000013741257720006400164210ustar00rootroot00000000000000icon = icon/icon-blowfish.png icon/icon-bug.png icon/icon-cow.png icon/icon-daemon.png \ icon/icon-dog.png icon/icon-elephant.png icon/icon-frog.png icon/icon-ghost.png \ icon/icon-konqui.png icon/icon-lion.png icon/icon-monkey.png icon/icon-penguin.png \ icon/icon-pig.png icon/icon-qq.png icon/icon-rabbit.png icon/icon-scream.png \ icon/icon-teddybear.png icon/icon-turtle.png icon/icon-tux.png tip = tip/tip-error.png tip/tip-finish.png tip/tip-hide.png tip/tip-recv.png tip/tip-send.png \ tip/tip-show.png menu = menu/menu-board.png menu/menu-detect.png menu/menu-group.png \ menu/menu-share.png pixmaps = $(tip) $(icon) $(menu) EXTRA_DIST = $(pixmaps) pixmapsdir = @pixmapsdir@ nobase_dist_pixmaps_DATA = $(pixmaps) iptux-0.6.3/pixmaps/Makefile.in000066400000000000000000000363021257720006400164260ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = pixmaps ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(nobase_dist_pixmaps_DATA) \ $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pixmapsdir)" DATA = $(nobase_dist_pixmaps_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_CFLAGS = @GST_CFLAGS@ GST_LIBS = @GST_LIBS@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ desktopdir = @desktopdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logodir = @logodir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pixmapsdir = @pixmapsdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sounddir = @sounddir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ icon = icon/icon-blowfish.png icon/icon-bug.png icon/icon-cow.png icon/icon-daemon.png \ icon/icon-dog.png icon/icon-elephant.png icon/icon-frog.png icon/icon-ghost.png \ icon/icon-konqui.png icon/icon-lion.png icon/icon-monkey.png icon/icon-penguin.png \ icon/icon-pig.png icon/icon-qq.png icon/icon-rabbit.png icon/icon-scream.png \ icon/icon-teddybear.png icon/icon-turtle.png icon/icon-tux.png tip = tip/tip-error.png tip/tip-finish.png tip/tip-hide.png tip/tip-recv.png tip/tip-send.png \ tip/tip-show.png menu = menu/menu-board.png menu/menu-detect.png menu/menu-group.png \ menu/menu-share.png pixmaps = $(tip) $(icon) $(menu) EXTRA_DIST = $(pixmaps) nobase_dist_pixmaps_DATA = $(pixmaps) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign pixmaps/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign pixmaps/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-nobase_dist_pixmapsDATA: $(nobase_dist_pixmaps_DATA) @$(NORMAL_INSTALL) @list='$(nobase_dist_pixmaps_DATA)'; test -n "$(pixmapsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pixmapsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pixmapsdir)" || exit 1; \ fi; \ $(am__nobase_list) | while read dir files; do \ xfiles=; for file in $$files; do \ if test -f "$$file"; then xfiles="$$xfiles $$file"; \ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ test -z "$$xfiles" || { \ test "x$$dir" = x. || { \ echo " $(MKDIR_P) '$(DESTDIR)$(pixmapsdir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(pixmapsdir)/$$dir"; }; \ echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(pixmapsdir)/$$dir'"; \ $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(pixmapsdir)/$$dir" || exit $$?; }; \ done uninstall-nobase_dist_pixmapsDATA: @$(NORMAL_UNINSTALL) @list='$(nobase_dist_pixmaps_DATA)'; test -n "$(pixmapsdir)" || list=; \ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ dir='$(DESTDIR)$(pixmapsdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(pixmapsdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-nobase_dist_pixmapsDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-nobase_dist_pixmapsDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-nobase_dist_pixmapsDATA \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-nobase_dist_pixmapsDATA .PRECIOUS: Makefile # 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: iptux-0.6.3/pixmaps/icon/000077500000000000000000000000001257720006400153055ustar00rootroot00000000000000iptux-0.6.3/pixmaps/icon/icon-blowfish.png000077500000000000000000000033751257720006400205710ustar00rootroot00000000000000PNG  IHDR;0sBIT|dIDATHYl\W;wxıl'fSiЖ!}hZZHBTm QRD 7HUiB4 YK\&'ncYzx'YX/}wt~GV۩W'|۽pjorŵ\ +=f+/j뎼A_ݮ_ˏ'ڶ=DU:fWԿ`h~ry[[V ,=[_t'`zZx}vڬ_%X}]tcMnppg௨&;Uj|nuee}u ָ.=CJ Ձ ҾՈ=4 BAW]tLN{6}}%SL8ޙ6o*Uo$3A CnoNTUL~jy} ]p)y=<>}ڗ@'hgَN>=3@erH)%kRkX?mP]݌8Y Y%p{9nE2/{xvi<|M'(L_|{xb)"nL&a mx,DQuh&k%\jw$Ȧ"zڷYYQ5R|5r*oBߋ;lTŇQTMPUcآ]S込m͏xbظe $#k뛼D?~{=G`A7ǽ5\*J2c`ŏNgF:F7qo&W=B|$)`f~b ^>l¶x+gۯ.} 6rc*^[Lh|${5HV`v#*Dx=xV ŗ$6 Z=z\?z>O&K|?Ε_~rQsݒjϤ5݋zMPf;Omo'HL<8U]4ޚ7'ɺn46޼_vC?~;1zn NR_yɨie 0gr'6sgjNHqOoߠ#B2|IENDB`iptux-0.6.3/pixmaps/icon/icon-bug.png000077500000000000000000000032541257720006400175250ustar00rootroot00000000000000PNG  IHDR;0sBIT|dcIDATH]l·wgvX&v6)viCD (PH)Rߐ*OR+ԠJ !wuu\ TWYKU.=Z<^`F:`I@lorf+c͵;I&7}zolP7A["J _u&+{@+?~L->~ORDp#- B*\M]KWQ j#ttthÆ|{UńZZqDHbPD(%-)7% d0x 5 lZyl gTFFZk+x"A@ J%\/ųmRD[B]Ba^2i9p`߶?>0U&J!R y4jrwj wj 55;=MmGKHF'_Yԋg^͢@ria %.*C6 r0 < Ν]KR wb#iDcf!@)r?`WB7?ߔ|t.IeoNӠi>@)p]p]Ҧ@pJyTBy@(_ ,xc!{+k eM# @,yD(Smx>:0ά޹s;v`yY &-5֯EL5;f2 J8p'/fA&]y|ͶiR+T4كсgKe۬1`x{auǀׁz{o_%֚I`^u\ίe(HIR04`ԁV$Jgf_"reH]Ẉr!%*~Yɞ5eP,FC/ZY|9p8"uŒ.466Z'N|.H}C`0rtRg\džJzc׮榦X 7j*9IENDB`iptux-0.6.3/pixmaps/icon/icon-cow.png000077500000000000000000000044571257720006400175460ustar00rootroot00000000000000PNG  IHDR;0sBIT|dIDATHmpTswf_n6,M0 DAE?,H" _Bu* L`+Ё@mHTH0Iv&fLּZ;=}ssqxy?u0?_xrʕcG֭{eᰄZ'8,*n&O>fw9Nی`lVzGӴn2 SK[*W[ yx9N=ϗ?|3p`ɉhyYي{~ĉ;%<΁1 CSY34--w?7w}w󬢢.vthW\h3GBS !+?k9co }KG(#_iyOIiezmrsz{z@ zqFpRO kX˒qw[*Dmbz}\Kfq5h4 ADiјL$)t#P;wnI$Ei8vH >E,GWW7O(݁ /Nkvqyttt```xW_V,qܮV?пdIZr쥥hmmECC8t:6b˰nh=uIBMM K/3 U{oLDQSz̾qϯȷ!246o ظq#2 , =]Mƹsa0={utt|q\$IW"Hb|3N+fIgZQ[[ ڵkA4XQB!$I8GY3-xL&S}^~>@8&̝;5556󨪪B0$IP,Yd E?l2ךfh܉+ppL9Nb1$IZsw11hv06 ,ɓдۺPPPt: e 6'z:5k8Ji^yt qyhߏݻw#!i(*.$))NNso2DQV^&RVȊY122%+PUfL$pLغS\^$ 1A@Yy9>f,`(gXVavB@Y֤*X,Ԍ`L=[?>B4ř3gxdL&H$nz=sH$0 A(`),f$I{g˗/ݖD˗/%8υ x<)QEEQK./^SXd즥UWoq4 "JO>8?3H  !8}4>#AQ`YRQ}>'7m˂~l` AeH4Og2H%`)e٬"CUU\,t3 ^x~O:kkjJUU(2LTjhIpEUEEKm6f۶mҒY$!NO{x*PдG鼦} Rj֭Ud2 a< H"nxHRH&H&HR XVl6XV\.]We@@SLWg稢(gve!A( _ ǃ vfe!("fO7oĥK,(][fe!bݾrSx: < ~ : .;--ɿk*kj0=l\BȞ.Y_}>8y3w/{W%% [!@{R#\9la"6R l[[O?qB 7%dz!zҜ3g?Wle/AO _S޺`3791i?]| L@:8{vy X: jj"F(zAYh@eu5ZD8t4 nmb?3pah$R)/ܭ F$ea bUNwtl 0<(s0kBF\2z*p54 C)u@pjk6fT_>$h]FFH[~& JKha\4هMl!v!y4!)U4 MJ4F>d2䀬 IuP'2^ KTK~HB<,xQ׮%ī :I]g\>FM9 Up8=̞FSݩ[e֭|~~<ٳxɺ5k۬ڵ 4VO/a ,Ƕ&S)fZC7s9> 74P\SCʕR+ c>OWױx%xS9bcPD-I(jl(m۶qkk --T57c&===DW'n? ~qu@p/$܌mϝ!֭[Gww7wFV@0eʕ׳o>|0őRv88g F(̊>N&-pu5mmmq4M,hmK~<]]]b1r!͇XfӀmx:]W>ip(.v/ x.]J_e% (Nt]gxxADP `<2 {Rj0ưBr[oqrv*%PSCpIp!LttCW,[9y`n󌌼hϛ M+02d}y5ǿmF_'~)ի475#\عWݭ2[Y]` F6HB<Xm-xT +WH_¸Sa+Mq#8BrJJo)vfD{;;wH4֋Fnʻ< y~ 3%׻SQ IR[غNBJ, MU'R5_^W/M<6 'F)vM,iWUQǁ5zA)7pХM h!vKjd')*Naz-68>)Wn1WxKIENDB`iptux-0.6.3/pixmaps/icon/icon-dog.png000077500000000000000000000037621257720006400175250ustar00rootroot00000000000000PNG  IHDR;0sBIT|dIDATH͖Y_U?wvvR -K[ 5 HMAۃĈ1QP$ H Z d4TJSJPZgt:|EAIN䷜GMBYx~2nݣAe腸]pbϪWW$YN4s9o%;8n4;W;gʕ7d6I dLM䶈p^audn)գkyv$Gp|:T،?,hM5V6ɛU(9x +:*Gfh5Ly.!=0,X:xw$"/:QIKd1m,ϐj˖2;: EOE_*y,ggWE^ ;vO8Ճ{-x:m`u+6پ~w-niR7vš˩/YAMx]ˉU [ #<?hcYxM^sw# qtkS嫶 < \ {z3k7{ό[ڸTZL4&:jN׃[*ꜢItؑ)Ư_CVږx:kas1k$NaZi:m]Uk(TV˞%{,s|qK%x^m¤!VXӾdq #"ŎbM!h]A!¹$qaE ǥxM?XVIJ1*<[QqW[An@a_n'I;Wq >wJL:CzpP#|X u|}ZIU[Vg2cdÅUtq,~wm ?cey3rM0*EpǭT o:yPtG G4\k+1S{. 5jX&: ߨk,)A*li\!\,͞ ? XHpSر)::^Pfo";.G9m@"|YG4P@֎j!+r9%nޱKݟMlt÷ ԑt\/\Kh{)M`0Z3LjH-iK+QX+ʻy. |оx{F(>5t_t mAӨ :m7T4c eނ ]xpk).]/[sX,JNYZhS0ja-X9cCF|`ƾšY'ȢyQTU0=GT޽m'ש[tj+m"B7X)GkӠ5JX'Vؙʎ{oB}xXW qFa:IIn~qpAG`Qah^ <:wТbO/?@ X$oU˟Κ-Qaafm^9tLq-vƁ#hƼu:e߁7]<(F />w@B})CV022BV7ƙO7=-"&> jxxJ J/Gw[~E7n3gj*O}]] _.8w]2/jY;}- . L1]D{N`~][t]gh=tWQ~_?i3Ǟ1ͷR.Sol=_߱?h5R*E#U$Rho75Yy]4w7ڰm vK {06 |:>kDQIsL\Z)t]EQ+t;34wim W5GǾvʻlHg cG;?ߋeZ>LQ9QBqA ey+x= HħH }Gy5?M ,}啿ui `ZWJt@._vl)AMMG?ևei{_/[^<i } (Rb~"K,7N57Vi 1TE!fp+`Q3+*$FSDoܹvvj)QA en]LRS!5 X[_B}]Xi"(UU5 ILRdŲ&N'⍍XE95㸔J. XWP-ˤsdSSi5q^=x'! @$CS4Ϋ `\9/B,Zol08<8N9a/~J{{O8etd,tU9r;/Ϝ駩EQ\*I1|.j:&33 WUivKݲ}4gHu@HIdSKH)1|e 52KEM%9ߞ KJ٨i| R*Xz5xA9)|);Uz>Y UV:{](m(TrH| O '|e%P__˝3 ǝm;J| ElGGU$rz` ]א)L,p -󸮋 (+/:4GXtlR"tPSmWAu]m۶ApIWl'Iy<ǫ2 4MQWkrEEUTba(! Z[[̴ svy6AI|>)!-͕utG2D&tvlO&Euu RNɩG^RɥRAU%BTU011F1 wIV,scuU|.K>}.$S X rVl8 +U[,~_;t!`L*aOCCvaݫ +rz M_B&)291[ob<9vqpÆ k7o|C}6]P8{u}iAvm0M ïa0@(b`4o#GNRȋXnU***F0nD"զib{Rj6k uQU+x HK&SIJ< 4d2H$ùagJݴiSqnuuZ˲44|x<r;v<>YB`UL˃ejH!Hd2| HDB!fdqhh={l:ߠiZ0nRHӧwYf[OOOأ~ZW-)Ta5 :8UKqU/pO^tUO6>ϸjt]FMn \m *1LoōGwzqV6.dOǭwB-f|&%-LiVY4~%Nw]6Ywy5t{(L'lD1?YOZ6,9=#%$=MYUzk/[<:wC҃.ڵt^>sr="Qcu&ܼv3ěb%2&8O#qiGw7?[١2ygft%]jl#`'&gb-uw agʒ*<ّ @@'iPqHi|*,52;D>; ^j~w9ײ`jh.fT;Df&3@k 6̖sLdR Sd\&9&3>ru+d+3$)|++Rgzy! gp} $Ll(96,C;TefKj#$WR#OR3n Eّsρ 辩zpTA/= ȗ^yVP:PA4]2p95YE+ bJauI+wN|)`D8=ʾ3טimI3?^KY\U& rvysL<ס917ĩN~Ds&枓X0nIr YE(>JV|د:$,K bm0r[Se?4FwSZDl&1t7=NBTyTh@0@V:9,zVB !H뽘_WFg_v\>3rPkJTzXܳ8z4,xt𙞃W54~G{ ͦ-*_9ZZV6o7Vk.Fʃ2B y[s3?O|60J,T7-Ss xotܱIc>xBr>4~-}"/ln|ܵTԮFcG+ \Ӣ-h4rK@IENDB`iptux-0.6.3/pixmaps/icon/icon-ghost.png000077500000000000000000000033511257720006400200720ustar00rootroot00000000000000PNG  IHDR;0sBIT|dIDATHmh[+9r[%;Kl9vR<0FR[] 1,1ƶ!|A k?t8f]ʆ-c϶v[[[ ?~~A0al vE{=/..<Ϗ|>B) x(kk >84ݼw?zޯ*yVPJC>ɓ/e9Ο<^zH&(5,|>ew4B^߽{7aw?o?ۻkhnn.|o p7 D"|o&0>/ qdTJ)@ m팺`JwNg%"#"aXPj"HT*!BQdEPJa B0<TXP4@4'Ns(e0::ht$ 8ˡ+K3 ==XYYÇ SSk;G}9tww!HTieY\LynZˊ"qa8{`Yg izpG˪+j*:tHQRu ua7UUH$:33fJ)!4 v,|Yd39*ILD>G*_?zRFm%I*_::vʲR3{k:2 t])C=4 ,;Ns`C,Wk0 B\a<ZL"'b 4ͣvFJMӞHk0 ArjG"AH p;`'3Mo0R X~YNmpBHk9tb0pkV3 BT1!mLӴ3 (ZPb1;!mZ˂Չ$]׵J (5X)fQ(Zh @$/ʇS~pP8wg=vzxyx\AV ^V}Xf)LR`Y(80 SiGAN(b_E1Hix]^^^J50 :d&۷o[[[~?4MCXD$!\.0 $af(6 t.,,oݺ5~ԩW'''677W2 a`~~NOO_ Bsss$ѥkӺ>g{EQ@)Z(dtݼy-..>Pׯ_o=p8)cfWWWK&lii7t?eꨮ`=xr^>=11c]=<<`75ŋbYW&''?PkX333o[[[ܾwgr Ϗ;c?#Gpn|Ó:"x\IENDB`iptux-0.6.3/pixmaps/icon/icon-konqui.png000077500000000000000000000036271257720006400202620ustar00rootroot00000000000000PNG  IHDR;0sBIT|dNIDATH{lƿ3;3^sLy@I(bIABGPC(HUe%&M NK!1`c fwӻ;;5Hs|{uF/{%#NGdGqqet5kuOOOc2:$h7/pK) &]r3ܯ>x_9آ=WUe"$c>cV\"3pSUML%\j܌%d z%S _(r2Zkp<^tNL{Q}܂u&6KޭE'Fq\R&5ռ_uO!YErqBqkWN) ) Gz V@)tv" elXr8U#CTrvT!W&TpYh4y UA1TU"6*+/XoHcVgQZ*G4OȐ oom@QPxObNGڡUeĻEP`4$rh9c1_ 2zR| 0*|"5ŪSRExW<IJxxn̟--W"buRLo0 DlIܾ3b HqISB.}l@u4otֽa+[`6ܟ9X~%\BK[o4T(1&lJZ8s{˅~Ɏ#n4}@n0o:5Ġ uDE?9 C`\߇|:q̵ХX(-vC dM'3cel&\ : )P,L*VxeYy. |FwTy!@UUUH(hz%QҰxuG6}lS֚FAwt,;' ( Οîv$b*JP0IspO@k6Xcc>4ρsȽ1rUNCAXXl \ATa(\F@J":+[GtOUڜ;iehPFt_|dh^gD0D [|d]]] 43.~iI0&"TQIENDB`iptux-0.6.3/pixmaps/icon/icon-lion.png000077500000000000000000000047711257720006400177160ustar00rootroot00000000000000PNG  IHDR;0sBIT|d IDATHypUg{{{$$  v@K@QV;u8TZtlEjqZu  =w9,:}|y΁kj}/r˪\\t-^y_.OpG_c 7!)Z}k{] 8cAkݒ25m6wN4͞],-^ WzNJ6Yxnjs,yzǢ^`Ԫ+\4ꕊ9[{Fv͎>&1XWvoNGn~ܳԉYVzpxLuÔD0oiB/6[kS]ʡ<5v 6ڰ6ݰ`* %l(6`l^k;%ljYٻҒ5/h1.&[x^CEM*t i;W̘V);"3gpZ8cERV꡼KYߍ! D#[։IHŠD6kͿo^ HWkq"oMbmg"vRV꥾"lj&#(l%ྡu̢JJY:?:]x_=lBoz/gjkud"f^C&,`%(V0Qpk:r{Y0^<8ެ_#WO*ۥ)'P|x矼fν6^{y-F4Evl3>L*wJ%♍yQ]WϪ3uɼ݂@-p.;_*m^ H \<~3e |W}P4e5A28z..`$J|yx!&b[Bmxg߰K ]vWxl3F/:A$$ pGqzYY?7^Ja T-mRWY0%pꧮm_bXֵ95D(6MK$-|1T2y)(RSDs HCSę؋,hx =zӧǒfPh Aޱ>FNd%KK(nf``hO<,˸% Qlv[YP=H|wd@dߺhh(|ɝ3n)+4T{Yqr%uMMWX B*EղLd`5 ͬ/`jE?NrcHg=SkJWh,;$,"vDqT|> .g݂̚CґDSdrȒ ]'>t$dNrCzdnk]]R;Tu]#b Ug/bTl*eƍlã[iW,jmj t|B""XVꃑLi8 ]r^}uE,Bv{ g{Fhlh$i̳ Wqu@Ѓ>>k_VTB x(~ִ6_Ö8̆7_,LG++ i!"[>ۍ]=LRtt.ٍd&;#Wy# bv (|3)6$J*YJC'p*vAJo_Ju cIhf9vt SuIo&5ٗ0}h)k[Gr*&9FНsرl6G4FUu,u k\lFEײxZ ~_W%Iԋ P61B}X^`&?ȿC=äC㌌FIg4DQİؿ=}t4l05҆IVZ{ʢ-PLZC7 DEBGݎ GsKHH@wHi9 M0e@"5ņO <|?T|dIbyD$iCM"C%^PTZ#VQ[@00 {#8{~ͮdR`RU+u,  g;$Dؽn&hl6eZ8{Z;xE;bt 1JM(DE$ID\ #J±mBR7_kMN.uO 6 IY kƯSRj?m5Onފa6e{DI4N{7uڦ zF͠.˂Jo nsxyeKu >Y*OKiՀ.S[<}m(=cn/INIENDB`iptux-0.6.3/pixmaps/icon/icon-monkey.png000077500000000000000000000037241257720006400202540ustar00rootroot00000000000000PNG  IHDR;0sBIT|dIDATH͖klw^;;]?b;^&')B@i)"JZڨHP>*ԴTmJA"" *-  Q! !F?c{}y+jG:3=ށԞgݏW]kOvڀmkzamaW}7p7Qj;8T'N,߼+օ*ޣ$ _ _N1cɢ8RKc}mFk;H!,#9M{#Hko|tzƴ^Hw{\1"yg,ӡND1l;^z&>O{9䃍s r桼uK9$ y_X;ĊG@nZ^>/JWIΙ̠>c,듵g3ֵd܋o?W=k:i3V|rL33,Lz:E%+UO1#ѺDےoK1N[h}8膅ݴX2f_K)Hdk~vtz䊧.&1w)FxRu>1G ^@eVYhϱd;^!m{Yspٝ4p;# !0·[H^B팏X(>NC pH"I>'O.xii.BPE5F@0}Lİ"F[[hicrٔSۂߨ>'roܗ5:ی6TA iҜ~ [l!i/*6n VxV)cM 2'%eeF5C^R_Ǒ}ҳ"V@XY[rƪ]Ȅ[U5)%B*I-p $5ѬNӮRJ0dN*Fݿ;\|]}v)pt7g? n%v1%0?ʦ+CΘVjPc#(5҃O@3AIPE`@|6Qm0 (tG6ZmFWN V#;xHɞRv3N}Iܪ(rÀ*CדMe[WT[1މ˾ӿ LsTuBm}6VvͩF/V.gdu"9"95v9=y,vF?Nw%-S3A! p(_"BFmJdzfmNYDE*u@o 쎧)D|dl{C  3|@ @h4@tevߺe_& .vuvdp?tn %! |{GFqdgg' ׿΢ƛ%QnZ޷֌uݭ\D˲ ɾ_)m T^P9 _1{b&@1cU7yԋ߻.sz5X#vlbbo7 DHy Oysh2P"9_mk>>f;~zC/Q=1yԾOzsyL@AQ)<@Fg6Jd\D\ 5pfzcRq޷m/6MdQ`<+L >ɢ_l?ҪxKnDc Դ]tDឮ}{yrrvR='j8E9(R:} +<RIENDB`iptux-0.6.3/pixmaps/icon/icon-penguin.png000077500000000000000000000034471257720006400204210ustar00rootroot00000000000000PNG  IHDR;0sBIT|dIDATHP?{''It@Pi阉!mGlδS&3Zh?NC*F3ӨLMʴSb4`(*b 98eqq~gޙ}>yaRe!pLii69٘_*U2mڴlt:żyO>\ XQׯO۳gjN緀@L*//АBr! ~k'aDQoΧ I dcǎE2i|ify"7Kn2TVVFn`x܊ I"nIM!D53\{}љjRXXȅ (++#??\hrЀa$lt:}V/vܹ5O !v\Κ5.''̙3LXNZN}ˮ]_$*O0 5P(!νuJoo9rm"R@nn.H$B,rFFU 1x}VY5M#'' Z {NBf}Oө,֭kgFj.G9q+t_" ^ oi@:ecp2'z#]%&\x# zᨒbc)} O]M8S#z+q=dz%_TҪU1U_"+ [piLdx:8Du<67ǒ5 l #:  F[7^>ŭ^o#Q}g> DV,v1dZ`'h3-t>}2g?*2;ztO'%Wgۮ~S{#SّiV}Nvh}~SX$qIENDB`iptux-0.6.3/pixmaps/icon/icon-pig.png000077500000000000000000000043641257720006400175320ustar00rootroot00000000000000PNG  IHDR;0sBIT|dIDATH{?s˲.VY@FA"DB#&TE6ڴiڦ61V`RS[JAuw5;ٙ7In&ssg\ڈc/BQs?}Bf9KnhCպд( G$S; йb틎 ! %=}amX3D=ENbNBCPs@z`˩CBhm2Htz%tPd1G;Ş60`@7ZVh*]KEUXGRTm!s<^E咍 KEQ-bh)&(? ;6]efɚCyrBqS2{RM&) A DoQKq&&qrE- " C bEVgefO; ]=tP?0H 2"\BsBsj8gvڅmݿ?;w$b44 kۃP DV+h<%Y=龓PfS-J @?۶m#N.[n|>ϦMm!o؀8 B7˗Yv|3~Әy[!`.&L__eY~=6l`h?cA< vX Դb딞Guj:a(=! oA_qO碜8T9DG/`Z+y2Gilo*wRň @@SCf*e!3_# f2hh 7 %f0 Mb!. #!ׅXu5, D'~Ov]JUmL{ %Bq0Uֆ@oP7JYh;j=>ﯹ\_xdsk-2=B<(_Z3 ZPeQg0 σvB$_ヒ@2IH7B=^hP wM`4D}LEEz{A y) W'FEfE = xxٷў-.H0͜4C %jf,?O>ꘚNdپ0P]N&W\EEұv{ f^ ~N Vx(C.5k\J'SޤWxch\Qg h/%7tՅ% `:NgwJ;?toerl.lhh 5H8Mj U jUJ%(; -m ]Hs%6C?3cҍV|&(s~R$m8Z aNPTM70L֎~\ XQ Sw޳)fk}2S^moI)g%;9 @@@T: #5(I(x+ `V >C#Wק,Zn =NQ>4'OīQ4;@UBY(Yچf D-WN;sG3@Kw=syݝ)8I3a2V*&t,[΅Wo"t)|Y+|;/~'|2 s|!1#ߙƺ~ѾUO7)HXD6BMM m?oyi||g񿔸nܲMW޲+m\b: BHqTώ}_9x4/3}ιzy.ӒH4&'&'?1^?=8M %>߬z 7? ~IENDB`iptux-0.6.3/pixmaps/icon/icon-qq.png000077500000000000000000000043301257720006400173650ustar00rootroot00000000000000PNG  IHDR:sRGBbKGD pHYs  tIME )$]&XIDATHǕWKl]W]wq⤍SINC R?(  3Č!EHH !*ʈJmMƉ>ۉg|6TE-mli-%m< IVJNs&@ܵTEcہ߸[ <*\.=9Inw{Λ;o,s0r?788ё JWR(R!W,=OM3c&3[pj<2'yǪԞsH;&`$N̡T,Srn$ruvgmsG(ת}OyFFpr$Rb0paLBeXZ^BS?lnc\)5_(oƞ=PJsP Q" #Ԇj#( b!啕c'C ䷋|^ʹѨT`iy ]DCm <Ѱְb!+%C䢇Z*SJJ$}667{"g( "\ZϜzv`uuZkc!Ev*R|Eg٧KKc>O<>CSv1Z#K3|K1P xUf)`O\kcq1Wqa2HY #$sh>HOhlw9P7:+ yM<>=UZDI@QV~?M_Ϭ=/Ͽ^riH}+_] P."4PבeQlu璘;r-;֛ۗѫ+}6ڭ\_ (Lk5\qqZt|;i} *ԳˣUŒ╖b]Ðf) aAvD4KQ{ՏnsūˣSѓDt_rk3KŜ&zmxdH YA߀g Dc ,E2.,,"L.+J ?ܭ3L]p<_ [S/ &dWcnamm kk(nag6q Fu<S-y%9!İ%NXg>[ҕK&*]X8j]ٴ6ݶ;feB$C2ljgIz| xYx7sUƹN/kշk;Ng!jW FƁ`W.b) t$Vgjg8t \; v|$!XAN!I`4ٸ}1\0',n:8o{[ Ĺr %9 X Ґ28& # 333s A223GZ˴$0"%|IqZXT(KIENDB`iptux-0.6.3/pixmaps/icon/icon-rabbit.png000077500000000000000000000032571257720006400202160ustar00rootroot00000000000000PNG  IHDR;0sBIT|dfIDATH[h\}sӌ.sŶD⺖_HTA:&׭۴5$% ֘RbL[p'!$NL1 'K\;*rHYn̹݇qZ{}!X,*ko'Oyͅ_^_xvFj6-f?OOtzNS?Ɩ4\6- >{@ X,O` MB- MT 0cSm:h P QQM&H|)ΆáCCut]G)}S暟f!іNMM1;;븮 (<!xc_Q re"\9(RJ<|qrBZ%Bhhq,~L7S’e1 xT*Ʌ 9z(Ffsa`&iyr)=-9hqG8w,ҖoHL\nӧe>30(*ZwӓJ/,zV9X/u]ar]0 R1<<g[~ (ũkի#o5`LNN%1MVEz48mX_oT|u[XV"|aY֮{P}P%p^fe`JA\#TH)RB)!Jx|\M:ޡߙ|ȡS^?^3r1ab(m|OR-Qj_wM#/>}ER?۹{Ͼ<6M"+YXa݇v<[~}=)Q b{6L)CYnewKjMM55h+lAk\T99G[lB$ٺƉƒ#lXHn~ ɦ]fiF(DI}ޜu!NZg֚i]~'k& Qg%SU8vcM3ք˞ Tg=IZim¶%BR,TdpC K8 5gK;)pöPH{4sFYF&A7: A3!Lti4Ri9Dfy-a& IENDB`iptux-0.6.3/pixmaps/icon/icon-teddybear.png000077500000000000000000000050101257720006400207030ustar00rootroot00000000000000PNG  IHDR;0sBIT|d IDATHi\U-z{zYg,&,!0@(Ha!(Z*r~A-E BL&2$齧~-$=Թ|}_b^y(|cilh-‰g5>mOwFW_ٚh#GM]_!lE{`2j 3k;;\9*O-44rE<,bp>ѓK??Q.H8r,8ޡvhzX&/,E 1I0 kO|.L9c+nvXcEa6$gళp;Xp,^>?BU#mwu]ƹ"PTiM aXzp C)%X8 4J4},ݨ;"k:jjp}pxQ`جga2_5P ¤X xu۩t@h|#I]+$XoPP^?!,ٌs* 8m\لSU&ru <^ P,k #VR+6~{u8wv!Dxt{$a NB!T |0=ϥ;4r|`,FgX+cϟBYRKeM>5bUlTSQçRO~T_X.v!e*ed%eӀW!*fϢ(XѷW`ZCaSys{k/F jXT VB1{/'?˗m7dִ1=~X C;aU-èk:R 8lh49=<>%^sˠoT~Y< Ԑ/J0 R9GkakƱ qִ9ɌdE]6/G7n?&fwdU#(t^Eb,(,:kڎx#2:`$`vZn._ՏwQJGL Vy ?څIYƑ;pK,3+,<mHy?۽#tVw+/h4!{Sb r9qbxu)qGRJ CrYRΈUEI_E]UL[WY20~&-h:":X-u%]ƠRw;:dIBw(|NFJ8kF\D0K86*Z,Q`( >$6(\^Q94(C)H]6^ Yj VU^)!ȁ]`6Bn\422.QI8-4BkEӶfKf j/8ƙKPEuv84dE(k4l !0r0Z{:P$h*ewÙSďk|U kS[eMY $)5 S **2@`8VĆסяNm󹐪Meڇu*i8R"֮nA"pvD:,VDxDelߢ47myjT"׏VJ'஑marаxfFMEEQ ˱ǙhVn8|b![P7, 17~L3iU3.BohcqtF20\.pR ҹl^l Z&$C`hU sYk(5;MorpyUY3uTΩYTl6w-I7N* &㉴#h,gkour1\ú/oF.63l~-fat11J4^JhTʦ/n;!xl|sٗ{ڽvqbۊbAQT 4 yd>MŴRE?iD8Uhld=~wx8=~4ܤgL*+\:ygҵktY+sL hS :4h87s1{,8Ǔlf)Ł⢙͖eY}P6N,^vkë˪lEۜ9y*/fɲT<1Wxo%_4LXݹ07?cީ?e_Kvq_㴲g\5EMN>7޿B>EqQIENDB`iptux-0.6.3/pixmaps/icon/icon-turtle.png000077500000000000000000000034401257720006400202640ustar00rootroot00000000000000PNG  IHDR;0sBIT|dIDATH{?󸯽]Xy-/[mZ (%T,ZM۴&MkDZcZҐj4֔KP@E].w޽Νy􏻨4$;9|眙']t8;l׭`mg̖4C7̔KSb0m-;f( !k(-P:B>\ٿឥo/?NL@#PJ6h-* .E#HtJ_+-.+={osrSa[ @)= 1BQF*} G*C@$}z-C[g٭)"$!J17qACH=:j@2R?z /MK6kMч"]tSE:BUՑG) 8Hj9wx]RëOHO^x%hTJ8F*ʽ pѲPsyȲ%%~3iM!"T>BQagC=L(B 1?x/s=󓱎ER֩gqb *J|v %K壭"lY]3x6@:yF0cYeq&v= 3Q~ÌH[H9Na(^Qv~njZv۴_~螰eMqwNjxώO`Cn[ &MxGXpxDM"J5&6@sB`y DR:4k2  ISu|-1d2I[[w\>Ϝ9X|Y /2cl[^jZ`HӦ+˾BqdҚp:V3w*TpH&hٺu+&Ν`ʕLz-/Pz^OڐJ$tS2eČ~1.كuҔg3arJ-k &$Sf!fXaaH gfC9ǘѾ65qg ͒砷fjæYysB!ZXIO~V5FD!玎˹+Ws4Q}mĞȐTI 'hLwpMd;:Z+u/JfDcf%/I%,Ὁ㙷ggNJǷmzGùܟaBD܊PTLG7onJLm~tߎ$R1 $u*Alnh7xy-R,O@ u {`k?(}"JZD,K+均}(ptUKZïOiN۶:[=3G/?Y蓡(/H˗IENDB`iptux-0.6.3/pixmaps/icon/icon-tux.png000077500000000000000000000037001257720006400175640ustar00rootroot00000000000000PNG  IHDR BsRGBbKGD pHYs  tIME *uc@IDATHǭ[lg{zg׻kf8`HQ)*6-ҾTK"C_[VR~ll 72Aݾcǎ#Lϲy~*Jٰϙч lF?6 ;i @4Be6Ms "0b7n>+ʳ(pa`̌[VjA@:Ʋ,( Q0Eij@d``܏iY8N;vl6`P(MMb߾}twu+$ %P(t钘*W._ d?m> SUmvl#@ljyK5cL\s7yYΔ(?94ܙ!k,ItY]THbߗ a&1%䞆  \}l5Ԑw8ʞ\~vC_H|}i<1UHՖgJVVԉ'i uݷ?^Vk!RT*R###O (6 !OhZTjd@H)iiiСC!4-*_F^5Mۭi7zzz.t]_E) /q,VU !uyB, !WJUki,Mt`uaǹYh<u1 ˲i~KӴϵim6Mso,"ַ }ibiO l5LX"Ll߾.lMz}D"(ibair>lOdRqR= }_Dq]Y) ٬zfmo6h̀__>QQ[$d봶y>(R_-:6~EhFkΞL}w7ϫp{IbǛ}&v>J7pk qGyxG ~|DSn޼IsS_Iܵ5 |yKLvׯ;w1:&=[\B)kXrYz6ѽ ߃VW*/N-?yR7il:MD""o\c$ルJ2F xt*##XzpԈzjw9]0Ƃf,VPAeVBl"#Ya@Ņ VHUĂ H(gAZU\8ܧ}zy&j9R<:OHɽH gyx~t?op.$P&W " R.TSd ly|B" I>ةآ(G$@`UR,@".Y2GvX@`B, 8C L0ҿ_pH˕͗K3w!lBa)f "#HL 8?flŢko">!N_puk[Vh]3 Z zy8@P< %b0>3o~@zq@qanvRB1n#Dž)4\,XP"MyRD!ɕ2 w ONl~Xv@~- g42y@+͗\LD*A aD@ $<B AT:18 \p` Aa!:b""aH4 Q"rBj]H#-r9\@ 2G1Qu@Ơst4]k=Kut}c1fa\E`X&cX5V5cX7va$^lGXLXC%#W 1'"O%zxb:XF&!!%^'_H$ɒN !%2I IkHH-S>iL&m O:ňL $RJ5e?2BQͩ:ZImvP/S4u%͛Cˤ-Кigih/t ݃EЗkw Hb(k{/LӗT02goUX**|:V~TUsU?y TU^V}FUP թU6RwRPQ__c FHTc!2eXBrV,kMb[Lvv/{LSCsfffqƱ9ٜJ! {--?-jf~7zھbrup@,:m:u 6Qu>cy Gm7046l18c̐ckihhI'&g5x>fob4ekVyVV׬I\,mWlPW :˶vm))Sn1 9a%m;t;|rtuvlp4éĩWggs5KvSmnz˕ҵܭm=}M.]=AXq㝧/^v^Y^O&0m[{`:>=e>>z"=#~~~;yN`k5/ >B Yroc3g,Z0&L~oL̶Gli})*2.QStqt,֬Yg񏩌;jrvgjlRlc웸xEt$ =sl3Ttcܢ˞w|/9%bKGD pHYs.#.#x?vtIME 8+mdIDAT8u]lUi~[veacl1@6,]4r#$HĀ^wBMDĘA0D&q6f +t]ۭ_=Iw'9<995F׉ lkފD؛q379J`k]2w;pٵ{)r7FؑS#tD&b-\j]D0YTW>[ 3UoNQ=fZRiS n} _@Pȁ[khhbB-bK@_+ 'M]'{{{_+|}{\-T"Qv26o:Y__o/|jq⯠@@_(aO\ɬϟWJboIye|.V]'Y a{i cŞ5X8xT7pmn*]HMUJ" IK[k0I光w٭ m`'@ Ժ8p]X(]EVCͭrx{[ M '87R;{RfR0 gEY|4Q(̕=}<|Ƒ3R9{-z}ۓ'oy.B ep_ @Wt6*<ɝ,MɏnӇ|?qqİke~M1)`T1s'΋3աo~S|)I/ߍaq# iBZ=J 7<{R~Bd.@ƽENVy1l Ł0+^ ̊f-Ϸ+;j=,ĆT/Xưr)S0dN%ST^#W-hⓊ dbIENDB`iptux-0.6.3/pixmaps/menu/menu-detect.png000077500000000000000000000066671257720006400202630ustar00rootroot00000000000000PNG  IHDR/\ CiCCPICC profilexڝSwX>eVBl"#Ya@Ņ VHUĂ H(gAZU\8ܧ}zy&j9R<:OHɽH gyx~t?op.$P&W " R.TSd ly|B" I>ةآ(G$@`UR,@".Y2GvX@`B, 8C L0ҿ_pH˕͗K3w!lBa)f "#HL 8?flŢko">!N_puk[Vh]3 Z zy8@P< %b0>3o~@zq@qanvRB1n#Dž)4\,XP"MyRD!ɕ2 w ONl~Xv@~- g42y@+͗\LD*A aD@ $<B AT:18 \p` Aa!:b""aH4 Q"rBj]H#-r9\@ 2G1Qu@Ơst4]k=Kut}c1fa\E`X&cX5V5cX7va$^lGXLXC%#W 1'"O%zxb:XF&!!%^'_H$ɒN !%2I IkHH-S>iL&m O:ňL $RJ5e?2BQͩ:ZImvP/S4u%͛Cˤ-Кigih/t ݃EЗkw Hb(k{/LӗT02goUX**|:V~TUsU?y TU^V}FUP թU6RwRPQ__c FHTc!2eXBrV,kMb[Lvv/{LSCsfffqƱ9ٜJ! {--?-jf~7zھbrup@,:m:u 6Qu>cy Gm7046l18c̐ckihhI'&g5x>fob4ekVyVV׬I\,mWlPW :˶vm))Sn1 9a%m;t;|rtuvlp4éĩWggs5KvSmnz˕ҵܭm=}M.]=AXq㝧/^v^Y^O&0m[{`:>=e>>z"=#~~~;yN`k5/ >B Yroc3g,Z0&L~oL̶Gli})*2.QStqt,֬Yg񏩌;jrvgjlRlc웸xEt$ =sl3Ttcܢ˞w|/9%bKGD pHYs.#.#x?vtIME5JIDAT8}Mhg3]'djjpFGkAJB/ -="<)ɄRDhi!"%4TBI4lٙyz$&x=CXvdnu瞣&sc[ I0':z&ؐ#Lu=pe3H&t>~ܖt`C'*:;4+?<<- TcZC @  vNxW=OB Gږ̵X w]BY$ zP NA1b_.ϭ2lшj_,,l)Zzdr RHmCtX]ʴvQ-C `S{ W%J[P1F0t@~yн|gD[N(D\[w[*=NW)c`D2=W?~޷)׻>Nj,75z `'}Vu7_v(}ԘKw,+loT䭊 M57n=*fF aUbfiߥ"ܭ~ygL-LʚW9 ,3 [BG~'ƞx?HeZ8Q^ƫ4<*ca1j",x2{]x7B:hٯ_=-K6 elE¶]v3 +S&MkwcV/IENDB`iptux-0.6.3/pixmaps/menu/menu-group.png000077500000000000000000000071431257720006400201350ustar00rootroot00000000000000PNG  IHDRDb CiCCPICC profilexڝSwX>eVBl"#Ya@Ņ VHUĂ H(gAZU\8ܧ}zy&j9R<:OHɽH gyx~t?op.$P&W " R.TSd ly|B" I>ةآ(G$@`UR,@".Y2GvX@`B, 8C L0ҿ_pH˕͗K3w!lBa)f "#HL 8?flŢko">!N_puk[Vh]3 Z zy8@P< %b0>3o~@zq@qanvRB1n#Dž)4\,XP"MyRD!ɕ2 w ONl~Xv@~- g42y@+͗\LD*A aD@ $<B AT:18 \p` Aa!:b""aH4 Q"rBj]H#-r9\@ 2G1Qu@Ơst4]k=Kut}c1fa\E`X&cX5V5cX7va$^lGXLXC%#W 1'"O%zxb:XF&!!%^'_H$ɒN !%2I IkHH-S>iL&m O:ňL $RJ5e?2BQͩ:ZImvP/S4u%͛Cˤ-Кigih/t ݃EЗkw Hb(k{/LӗT02goUX**|:V~TUsU?y TU^V}FUP թU6RwRPQ__c FHTc!2eXBrV,kMb[Lvv/{LSCsfffqƱ9ٜJ! {--?-jf~7zھbrup@,:m:u 6Qu>cy Gm7046l18c̐ckihhI'&g5x>fob4ekVyVV׬I\,mWlPW :˶vm))Sn1 9a%m;t;|rtuvlp4éĩWggs5KvSmnz˕ҵܭm=}M.]=AXq㝧/^v^Y^O&0m[{`:>=e>>z"=#~~~;yN`k5/ >B Yroc3g,Z0&L~oL̶Gli})*2.QStqt,֬Yg񏩌;jrvgjlRlc웸xEt$ =sl3Ttcܢ˞w|/9%bKGD pHYs.#.#x?vtIME)s IDAT8}[lSu?snQsC*E$$3^2%AB3L X@`1L7w]i{wOږ;:knZx>of_:&[&&y#_h绯4vľaUlG#e <L*Ӄ/v?;o]zbH)2 %e5D7$D"vXKJO.kSv'_D`ZOuo}+m9ξ;t}N'ȫp7o n r v4 .O7a===K?N,߼@nw=*8\3bß=ʅE$SPl=N]WėEl䚐-Ѳ Oc LMa:BxL[awnaeƙo8*ސ1E2DDZDKƋɼLǭJtS_v2_,cVg,Ӵ(MPB3g3V'uÏRi?N@Tga 4ʲd;<;sg,DbhXQ[(^lKas;v|%8!$t4"{g{l9y{DdOc)/OYNNK ]adC@qqJp_>FHVzPU?-WӵN?vQ#UϜZ?O;Ѭ 93i3RʧXRhHUG:BTA] ,m@߹uOp4Ľ "9UD^b8#S=ԠPTmgku|A@pswIENDB`iptux-0.6.3/pixmaps/menu/menu-share.png000077500000000000000000000070271257720006400201040ustar00rootroot00000000000000PNG  IHDR;mG MiCCPPhotoshop ICC profilexڝSwX>eVBl"#Ya@Ņ VHUĂ H(gAZU\8ܧ}zy&j9R<:OHɽH gyx~t?op.$P&W " R.TSd ly|B" I>ةآ(G$@`UR,@".Y2GvX@`B, 8C L0ҿ_pH˕͗K3w!lBa)f "#HL 8?flŢko">!N_puk[Vh]3 Z zy8@P< %b0>3o~@zq@qanvRB1n#Dž)4\,XP"MyRD!ɕ2 w ONl~Xv@~- g42y@+͗\LD*A aD@ $<B AT:18 \p` Aa!:b""aH4 Q"rBj]H#-r9\@ 2G1Qu@Ơst4]k=Kut}c1fa\E`X&cX5V5cX7va$^lGXLXC%#W 1'"O%zxb:XF&!!%^'_H$ɒN !%2I IkHH-S>iL&m O:ňL $RJ5e?2BQͩ:ZImvP/S4u%͛Cˤ-Кigih/t ݃EЗkw Hb(k{/LӗT02goUX**|:V~TUsU?y TU^V}FUP թU6RwRPQ__c FHTc!2eXBrV,kMb[Lvv/{LSCsfffqƱ9ٜJ! {--?-jf~7zھbrup@,:m:u 6Qu>cy Gm7046l18c̐ckihhI'&g5x>fob4ekVyVV׬I\,mWlPW :˶vm))Sn1 9a%m;t;|rtuvlp4éĩWggs5KvSmnz˕ҵܭm=}M.]=AXq㝧/^v^Y^O&0m[{`:>=e>>z"=#~~~;yN`k5/ >B Yroc3g,Z0&L~oL̶Gli})*2.QStqt,֬Yg񏩌;jrvgjlRlc웸xEt$ =sl3Ttcܢ˞w|/%ҟ3bKGD pHYs.#.#x?vtIME #KIDAT8ˍYlTuΝ3e,P۴Hӎu j1&!Ą\iD"&D}RQi 6,-2-tν%Η8(- zu5Gj0 u;\B]C=?mo(;uX-Mwi'ݰ9XinvliYoE~x{^ŪDt ~S}蹥ȮSO4hjw;E`e@"@xX0}dg' _3F~Y+#˔\&&4:HEoo'gJwp[WΞ?8H:QxWvtHy}=[ 8 v;26LO Jn.2; ĘFAd"{WYcqd't<2; PXYY#Xuu<~7o*%n[<} yyH@$0ɓ[:{`=@O$HdNcE"^8K*.^Tv֌0rnFQe%f &/]WW1 O{<؜Ndea:;3)ԯ"46YPL<ʪSUB!luu~?%H,Ɯ/ ~%:300T*ŷ==ʋAZR0M7ofalLd2a+o(aŲ̟ǥyy>hx@eii ]ut:a`YbD"ttNSMӊ='M0ѯ>IENDB`iptux-0.6.3/pixmaps/tip/tip-finish.png000077500000000000000000000014701257720006400177360ustar00rootroot00000000000000PNG  IHDR1_sRGBbKGD pHYs  tIME G4lIDAT8˕KSou?Csҙ.( f@B+JP*^z(CiC"2 %2Z9t]9דi9TD(!H5jl[W' IF \Pk"%8UehjS"c$EbωM sS@ a1@pه>HM).tYF!R03K\yKC-"L{>!EeV X50["}]J ɰ坹&.>,*` L#mu%Mwא/E @/B@Hz 4d-ldwR^L ȡ}DZM6S#O(2: sn;5"e!C*U"$qU=Ȍ*ĩzzOAp>1a>3D8C^BK~!igҼt{# ]NsaV]7ZDz\zlg D$C'@N,ǡJ153izwkzxp_'kEݳ'\N7ıD,Fst̹mO]]j|Ǹ!.,hSȗ,|nM~5`sРU暮͐ a3q}Oˁh+ |}IENDB`iptux-0.6.3/pixmaps/tip/tip-hide.png000077500000000000000000000015151257720006400173670ustar00rootroot00000000000000PNG  IHDR;֕JsRGBbKGD pHYs  tIME &XߴIDAT(mkfɲ,ųd;& Bֱ(tGAo#XvrtV:XZYɒ%nڲCeGg;n=} y\Jؔˆhʺ{"{fW7eg!bw( әU̗k)5]~-wecNwwIXq\ eRRJruS7ǍSe hPYUpj'E}II0hrB\$L6G,*_*> k[>g1xRy|*Cĕ_Kw9j<'PBA䅼,?NFO3t[cL'Ni>U0K6!m"ٴ` )X^CX'cDtIUQá@4WJ qILLRXXXVI2B"DVHH)QFF =? D2Bu9 i1D6Us}hI =ѣK$"^#!9!a`V$ע^R 5(lZ@1"LHKm[9T:kLǢ ۬ hU $ GX>d gy)|_,\@V{//K ǫxCuZRRy C @rfwZ. 0dPk ,]t18y(QˡKAȤxL 'ʵ ;Z48E(+a]aЎEݛ_FյEI;E[Hޮ9U(ԑ'㷯ͧcue ({p>mY;lnISIENDB`iptux-0.6.3/pixmaps/tip/tip-send.png000077500000000000000000000012601257720006400174040ustar00rootroot00000000000000PNG  IHDR/\sBIT|dgIDAT8=LSQ}}-մAbTRMdЄAb4 2%Hh$AL@E!|/|{ǡ5KιGQ\o;YiR;TĽr7:P:QZREhʞO4w_m bu)};\TT x⋙٦G=VL' ((ڰ}Û؋On BmFLz8Z0 Q8 ױjESk_BC/``;өa,' " !?Z_}{_?v7&}Kd%IqTNdoۑ8yMt$ٛz x% R saHKz*6x75bYd^NN.CX|Z8hΛ |TJnHP<9{5<(.CӎD@rV5X"H!@7u5kN:ZkR|k[rbEXjP&σAk )r(2:+hxL/`Ǯse(@)PP]"jvvW-4 /iFIENDB`iptux-0.6.3/pixmaps/tip/tip-show.png000077500000000000000000000015231257720006400174350ustar00rootroot00000000000000PNG  IHDR;֕JsRGBbKGD pHYs  tIME ?ZIDAT(]ouܯN;[vڂF k4OX^OГzZL\IHhL<i$A,qQi aYݙ '=KZLXS!1ҞTPUV8iwCՍ[?w/0@QTJutjʭ}IK{ܿzo*6")L$8XE{ gsђ|_*ܡ=B3d'LYE#%܀!6.VQ@gkMFگW.0H P *zFu{;U/ث۽KAE}잁2~(! $Te$|2wv %YU_=4yέc9L y # # This file file be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. # # - Modified by Owen Taylor to use GETTEXT_PACKAGE # instead of PACKAGE and to look for po2tbl in ./ not in intl/ # # - Modified by jacob berkman to install # Makefile.in.in and po2tbl.sed.in for use with glib-gettextize GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = @SHELL@ @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datarootdir = @datarootdir@ datadir = @datadir@ libdir = @libdir@ localedir = $(libdir)/locale gnulocaledir = $(datadir)/locale gettextsrcdir = $(datadir)/glib-2.0/gettext/po subdir = po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@ CC = @CC@ GENCAT = @GENCAT@ GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ XGETTEXT = @XGETTEXT@ MSGMERGE = msgmerge DEFS = @DEFS@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ INCLUDES = -I.. -I$(top_srcdir)/intl COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) SOURCES = POFILES = @POFILES@ GMOFILES = @GMOFILES@ DISTFILES = LINGUAS ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \ $(POFILES) $(GMOFILES) $(SOURCES) POTFILES = \ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ INSTOBJEXT = @INSTOBJEXT@ .SUFFIXES: .SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat .c.o: $(COMPILE) $< .po.pox: $(MAKE) $(GETTEXT_PACKAGE).pot $(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*.pox .po.mo: $(MSGFMT) -o $@ $< .po.gmo: file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ && rm -f $$file && $(GMSGFMT) $(MSGFMT_OPTS) -o $$file $< .po.cat: sed -f ../intl/po2msg.sed < $< > $*.msg \ && rm -f $@ && $(GENCAT) $@ $*.msg all: all-@USE_NLS@ all-yes: $(CATALOGS) all-no: $(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES) $(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \ --add-comments --keyword=_ --keyword=N_ \ --keyword=C_:1c,2 \ --keyword=NC_:1c,2 \ --keyword=g_dcgettext:2 \ --keyword=g_dngettext:2,3 \ --keyword=g_dpgettext2:2c,3 \ --flag=N_:1:pass-c-format \ --flag=C_:2:pass-c-format \ --flag=NC_:2:pass-c-format \ --flag=g_dngettext:2:pass-c-format \ --flag=g_strdup_printf:1:c-format \ --flag=g_string_printf:2:c-format \ --flag=g_string_append_printf:2:c-format \ --flag=g_error_new:3:c-format \ --flag=g_set_error:4:c-format \ --flag=g_markup_printf_escaped:1:c-format \ --flag=g_log:3:c-format \ --flag=g_print:1:c-format \ --flag=g_printerr:1:c-format \ --flag=g_printf:1:c-format \ --flag=g_fprintf:2:c-format \ --flag=g_sprintf:2:c-format \ --flag=g_snprintf:3:c-format \ --flag=g_scanner_error:2:c-format \ --flag=g_scanner_warn:2:c-format \ --files-from=$(srcdir)/POTFILES.in \ && test ! -f $(GETTEXT_PACKAGE).po \ || ( rm -f $(srcdir)/$(GETTEXT_PACKAGE).pot \ && mv $(GETTEXT_PACKAGE).po $(srcdir)/$(GETTEXT_PACKAGE).pot ) install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ install-data-no: all install-data-yes: all if test -r "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \ fi @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ case "$$cat" in \ *.gmo) destdir=$(gnulocaledir);; \ *) destdir=$(localedir);; \ esac; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \ if test -r "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $$dir; \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \ fi; \ if test -r $$cat; then \ $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \ else \ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ echo "installing $(srcdir)/$$cat as" \ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \ fi; \ if test -r $$cat.m; then \ $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \ else \ if test -r $(srcdir)/$$cat.m ; then \ $(INSTALL_DATA) $(srcdir)/$$cat.m \ $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ echo "installing $(srcdir)/$$cat as" \ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \ else \ true; \ fi; \ fi; \ done if test "$(PACKAGE)" = "glib"; then \ if test -r "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \ fi; \ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ else \ : ; \ fi # Define this as empty until I found a useful application. installcheck: uninstall: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ done if test "$(PACKAGE)" = "glib"; then \ rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ fi check: all dvi info tags TAGS ID: mostlyclean: rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f $(GMOFILES) distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(DISTFILES) dists="$(DISTFILES)"; \ for file in $$dists; do \ ln $(srcdir)/$$file $(distdir) 2> /dev/null \ || cp -p $(srcdir)/$$file $(distdir); \ done update-po: Makefile $(MAKE) $(GETTEXT_PACKAGE).pot tmpdir=`pwd`; \ cd $(srcdir); \ catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ echo "$$lang:"; \ if $(MSGMERGE) $$lang.po $(GETTEXT_PACKAGE).pot -o $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$cat failed!"; \ rm -f $$tmpdir/$$lang.new.po; \ fi; \ done # POTFILES is created from POTFILES.in by stripping comments, empty lines # and Intltool tags (enclosed in square brackets), and appending a full # relative path to them POTFILES: POTFILES.in ( if test 'x$(srcdir)' != 'x.'; then \ posrcprefix='$(top_srcdir)/'; \ else \ posrcprefix="../"; \ fi; \ rm -f $@-t $@ \ && (sed -e '/^#/d' \ -e "s/^\[.*\] +//" \ -e '/^[ ]*$$/d' \ -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \ | sed -e '$$s/\\$$//') > $@-t \ && chmod a-w $@-t \ && mv $@-t $@ ) Makefile: Makefile.in.in ../config.status POTFILES cd .. \ && $(SHELL) ./config.status $(subdir)/$@.in # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: iptux-0.6.3/po/POTFILES.in000077500000000000000000000011511257720006400150700ustar00rootroot00000000000000# List of source files containing translatable strings. src/AnalogFS.cpp src/callback.cpp src/Command.cpp src/CoreThread.cpp src/DataSettings.cpp src/DetectPal.cpp src/dialog.cpp src/DialogGroup.cpp src/DialogPeer.cpp src/HelpDialog.cpp src/iptux.cpp src/LogSystem.cpp src/MainWindow.cpp src/mess.cpp src/output.cpp src/ProgramData.cpp src/RecvFile.cpp src/RecvFileData.cpp src/RevisePal.cpp src/SendFile.cpp src/SendFileData.cpp src/ShareFile.cpp src/SoundSystem.cpp src/StatusIcon.cpp src/support.cpp src/TcpData.cpp src/UdpData.cpp src/uninstall/ihateiptux.cpp src/uninstall/utils.cpp src/utils.cpp src/wrapper.cppiptux-0.6.3/po/de.po000066400000000000000000000512151257720006400142460ustar00rootroot00000000000000# German translation for iptux # Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 # This file is distributed under the same license as the iptux package. # FIRST AUTHOR , 2009. # msgid "" msgstr "" "Project-Id-Version: iptux\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-02-06 19:16+0800\n" "PO-Revision-Date: 2010-03-26 00:16+0800\n" "Last-Translator: zhangjiejing \n" "Language-Team: German \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2009-10-31 13:28+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: src/AnalogFS.cpp:84 src/AnalogFS.cpp:89 #, c-format msgid "Open() file \"%s\" failed, %s" msgstr "" #: src/AnalogFS.cpp:109 #, c-format msgid "Stat64() file \"%s\" failed, %s" msgstr "" #: src/AnalogFS.cpp:130 #, c-format msgid "Mkdir() directory \"%s\" failed, %s" msgstr "" #: src/AnalogFS.cpp:145 #, c-format msgid "opendir on \"%s\" failed: %s" msgstr "" #: src/AnalogFS.cpp:191 #, c-format msgid "Opendir() directory \"%s\" failed, %s" msgstr "" #: src/Command.cpp:221 msgid "Your pal didn't receive the packet. He or she is offline maybe." msgstr "" #: src/CoreThread.cpp:231 src/DialogPeer.cpp:762 src/RecvFileData.cpp:152 #: src/RecvFileData.cpp:212 src/support.cpp:166 #, c-format msgid "" "Fatal Error!!\n" "Failed to create new socket!\n" "%s" msgstr "" #: src/CoreThread.cpp:556 src/CoreThread.cpp:581 src/CoreThread.cpp:1121 #: src/CoreThread.cpp:1147 msgid "Others" msgstr "" #: src/CoreThread.cpp:980 src/RecvFileData.cpp:133 src/RecvFileData.cpp:265 #: src/SendFileData.cpp:134 src/SendFileData.cpp:221 src/ShareFile.cpp:228 #: src/ShareFile.cpp:386 msgid "unknown" msgstr "Unbekannt" #: src/CoreThread.cpp:994 msgid "" msgstr "" #: src/CoreThread.cpp:1171 msgid "Broadcast" msgstr "" #: src/DataSettings.cpp:56 msgid "Personal" msgstr "" #: src/DataSettings.cpp:58 msgid "System" msgstr "" #: src/DataSettings.cpp:61 msgid "Sound" msgstr "" #: src/DataSettings.cpp:64 msgid "Network" msgstr "" #: src/DataSettings.cpp:148 msgid "Preferences" msgstr "" #: src/DataSettings.cpp:178 msgid "Your nickname:" msgstr "Ihr Nickname:" #: src/DataSettings.cpp:184 msgid "Please input your nickname!" msgstr "" #: src/DataSettings.cpp:189 msgid "Your group name:" msgstr "Ihr Gruppenname:" #: src/DataSettings.cpp:195 msgid "Please input your group name!" msgstr "" #: src/DataSettings.cpp:200 msgid "Your face picture:" msgstr "" #: src/DataSettings.cpp:213 msgid "Save files to: " msgstr "" #: src/DataSettings.cpp:223 msgid "Photo" msgstr "" #: src/DataSettings.cpp:235 msgid "Signature" msgstr "" #: src/DataSettings.cpp:266 msgid "Candidate network coding:" msgstr "" #: src/DataSettings.cpp:272 msgid "Candidate network coding" msgstr "" #: src/DataSettings.cpp:277 msgid "Preference network coding:" msgstr "" #: src/DataSettings.cpp:283 msgid "" "Preference network coding (You should be aware of what you are doing if you " "want to modify it.)" msgstr "" #: src/DataSettings.cpp:289 msgid "Pal's default face picture:" msgstr "" #: src/DataSettings.cpp:302 msgid "Panel font:" msgstr "" #: src/DataSettings.cpp:310 msgid "Automatically open the chat dialog" msgstr "" #: src/DataSettings.cpp:315 msgid "Automatically hide the panel after login" msgstr "" #: src/DataSettings.cpp:320 msgid "Automatically open the File Transmission Management" msgstr "" #: src/DataSettings.cpp:325 msgid "Use the 'Enter' key to send message" msgstr "" #: src/DataSettings.cpp:330 msgid "Automatically clean up the chat history" msgstr "" #: src/DataSettings.cpp:335 msgid "Save the chat history" msgstr "" #: src/DataSettings.cpp:340 msgid "Use the Blacklist (NOT recommended)" msgstr "" #: src/DataSettings.cpp:345 msgid "Filter the request of sharing files" msgstr "" #: src/DataSettings.cpp:367 msgid "Activate the sound support" msgstr "" #: src/DataSettings.cpp:374 msgid "Volume Control: " msgstr "" #: src/DataSettings.cpp:383 msgid "Sound Event" msgstr "" #: src/DataSettings.cpp:411 msgid "Test" msgstr "" #: src/DataSettings.cpp:414 msgid "Stop" msgstr "" #: src/DataSettings.cpp:437 msgid "From:" msgstr "" #: src/DataSettings.cpp:443 msgid "Beginning of the IP(v4) section" msgstr "" #: src/DataSettings.cpp:446 msgid "To:" msgstr "" #: src/DataSettings.cpp:452 msgid "End of the IP(v4) section" msgstr "" #: src/DataSettings.cpp:459 msgid "Add" msgstr "Hinzufügen" #: src/DataSettings.cpp:463 msgid "Delete" msgstr "Löschen" #: src/DataSettings.cpp:469 msgid "Added IP(v4) Section:" msgstr "" #: src/DataSettings.cpp:488 msgid "Import" msgstr "Importieren" #: src/DataSettings.cpp:491 msgid "Export" msgstr "Exportieren" #: src/DataSettings.cpp:494 msgid "Clear" msgstr "Leeren" #: src/DataSettings.cpp:709 msgid "Transfer finished" msgstr "" #: src/DataSettings.cpp:714 msgid "Message received" msgstr "" #: src/DataSettings.cpp:775 msgid "Play" msgstr "" #: src/DataSettings.cpp:782 msgid "Event" msgstr "" #: src/DataSettings.cpp:816 msgid "From" msgstr "" #: src/DataSettings.cpp:822 msgid "To" msgstr "" #: src/DataSettings.cpp:830 msgid "Description" msgstr "" #: src/DataSettings.cpp:847 msgid "Please select download folder" msgstr "" #: src/DataSettings.cpp:869 msgid "Select Font" msgstr "" #: src/DataSettings.cpp:882 msgid "Please select a sound file" msgstr "" #: src/DataSettings.cpp:1157 src/DataSettings.cpp:1189 #, c-format msgid "" "Fopen() file \"%s\" failed!\n" "%s" msgstr "" #: src/DataSettings.cpp:1238 src/DialogGroup.cpp:647 msgid "Select All" msgstr "" #: src/DataSettings.cpp:1243 src/DialogGroup.cpp:652 msgid "Reverse Select" msgstr "" #: src/DataSettings.cpp:1248 src/DialogGroup.cpp:657 msgid "Clear Up" msgstr "Leeren" #: src/DataSettings.cpp:1342 src/RevisePal.cpp:426 msgid "Please select a face picture" msgstr "" #: src/DataSettings.cpp:1365 msgid "Please select a personal photo" msgstr "" #: src/DataSettings.cpp:1509 src/DataSettings.cpp:1516 src/DetectPal.cpp:122 #, c-format msgid "" "\n" "Illegal IP(v4) address: %s!" msgstr "" #: src/DataSettings.cpp:1614 msgid "Please select a file to import data" msgstr "" #: src/DataSettings.cpp:1662 msgid "Save data to file" msgstr "" #: src/DetectPal.cpp:70 msgid "Detect pals" msgstr "" #: src/DetectPal.cpp:72 msgid "Detect" msgstr "Finden" #: src/DetectPal.cpp:73 src/ShareFile.cpp:107 msgid "Cancel" msgstr "Abbrechen" #: src/DetectPal.cpp:91 msgid "Please input an IP address (IPv4 only):" msgstr "" #: src/DetectPal.cpp:99 msgid "Please input an IP address (IPv4 only)!" msgstr "" #: src/DetectPal.cpp:127 #, c-format msgid "The notification has been sent to %s." msgstr "" #: src/dialog.cpp:34 msgid "" "File transfer has not been completed.\n" "Are you sure to cancel and quit?" msgstr "" #: src/dialog.cpp:37 msgid "Confirm Exit" msgstr "" #: src/dialog.cpp:57 src/DialogPeer.cpp:379 src/MainWindow.cpp:1597 msgid "Request Shared Resources" msgstr "" #: src/dialog.cpp:60 msgid "Agree" msgstr "Zustimmen" #: src/dialog.cpp:61 src/DialogPeer.cpp:848 msgid "Refuse" msgstr "Zurückweisen" #: src/dialog.cpp:74 #, c-format msgid "" "Your pal (%s)[%s]\n" "is requesting to get your shared resources,\n" "Do you agree?" msgstr "" #: src/dialog.cpp:103 msgid "Access Password" msgstr "" #: src/dialog.cpp:110 msgid "Please input the password for the shared files behind" msgstr "" #: src/dialog.cpp:123 #, c-format msgid "(%s)[%s]Password:" msgstr "" #: src/dialog.cpp:140 src/dialog.cpp:200 msgid "" "\n" "Empty Password!" msgstr "" #: src/dialog.cpp:163 msgid "Enter a New Password" msgstr "" #: src/dialog.cpp:173 msgid "Password: " msgstr "" #: src/dialog.cpp:181 msgid "Repeat: " msgstr "" #: src/dialog.cpp:195 msgid "" "\n" "Password Mismatched!" msgstr "" #: src/dialog.cpp:226 msgid "Please select a folder to save files." msgstr "" #: src/DialogGroup.cpp:277 #, c-format msgid "Talk with the group %s" msgstr "" #: src/DialogGroup.cpp:371 msgid "Member" msgstr "" #: src/DialogGroup.cpp:465 msgid "Send" msgstr "Senden" #: src/DialogGroup.cpp:472 msgid "Pals" msgstr "" #: src/DialogGroup.cpp:495 src/DialogPeer.cpp:409 src/MainWindow.cpp:865 msgid "_Tools" msgstr "_Werkzeuge" #: src/DialogGroup.cpp:501 src/DialogPeer.cpp:417 msgid "Clear Buffer" msgstr "Zwischenspeicher leeren" #: src/DialogGroup.cpp:508 msgid "Sort" msgstr "Sortieren" #: src/DialogGroup.cpp:514 src/MainWindow.cpp:904 msgid "By Nickname" msgstr "Nach Nickname" #: src/DialogGroup.cpp:521 src/MainWindow.cpp:911 msgid "By IP" msgstr "Nach IP" #: src/DialogGroup.cpp:531 src/MainWindow.cpp:921 msgid "Ascending" msgstr "" #: src/DialogGroup.cpp:538 src/MainWindow.cpp:928 msgid "Descending" msgstr "" #: src/DialogPeer.cpp:231 #, c-format msgid "Talk with %s(%s) IP:%s" msgstr "" #: src/DialogPeer.cpp:329 msgid "Info." msgstr "" #: src/DialogPeer.cpp:363 src/MainWindow.cpp:819 msgid "_File" msgstr "_Datei" #: src/DialogPeer.cpp:367 msgid "Attach File" msgstr "" #: src/DialogPeer.cpp:373 msgid "Attach Folder" msgstr "" #: src/DialogPeer.cpp:389 msgid "Close" msgstr "Schließen" #: src/DialogPeer.cpp:413 msgid "Insert Picture" msgstr "Bild einfügen" #: src/DialogPeer.cpp:438 src/MainWindow.cpp:1653 #, c-format msgid "Version: %s\n" msgstr "Version: %s\n" #: src/DialogPeer.cpp:442 src/MainWindow.cpp:1657 #, c-format msgid "Nickname: %s@%s\n" msgstr "Nickname: %s@%s\n" #: src/DialogPeer.cpp:444 src/MainWindow.cpp:1659 #, c-format msgid "Nickname: %s\n" msgstr "Nickname: %s\n" #: src/DialogPeer.cpp:447 src/MainWindow.cpp:1662 #, c-format msgid "User: %s\n" msgstr "Benutzer: %s\n" #: src/DialogPeer.cpp:450 src/MainWindow.cpp:1665 #, c-format msgid "Host: %s\n" msgstr "Host: %s\n" #: src/DialogPeer.cpp:455 src/MainWindow.cpp:1670 #, c-format msgid "Address: %s(%s)\n" msgstr "Addresse: %s(%s)\n" #: src/DialogPeer.cpp:457 src/MainWindow.cpp:1672 #, c-format msgid "Address: %s\n" msgstr "" #: src/DialogPeer.cpp:461 src/MainWindow.cpp:1676 #, c-format msgid "Compatibility: Microsoft\n" msgstr "Kompatibilität: Microsoft\n" #: src/DialogPeer.cpp:463 src/MainWindow.cpp:1678 #, c-format msgid "Compatibility: GNU/Linux\n" msgstr "Kompatibilität: GNU/Linux\n" #: src/DialogPeer.cpp:466 src/MainWindow.cpp:1681 #, c-format msgid "System coding: %s\n" msgstr "" #: src/DialogPeer.cpp:470 src/MainWindow.cpp:1685 msgid "Signature:\n" msgstr "" #: src/DialogPeer.cpp:477 msgid "" "\n" "Photo:\n" msgstr "" #: src/DialogPeer.cpp:722 msgid "Please select a picture to insert the buffer" msgstr "" #: src/DialogPeer.cpp:789 msgid "Enclosure." msgstr "" #: src/DialogPeer.cpp:836 msgid "File to be receive." msgstr "" #: src/DialogPeer.cpp:840 msgid "Receiving progress." msgstr "" #: src/DialogPeer.cpp:843 msgid "Accept" msgstr "" #: src/DialogPeer.cpp:853 msgid "Detial" msgstr "" #: src/DialogPeer.cpp:884 #, fuzzy msgid "File received." msgstr "empfangen" #: src/DialogPeer.cpp:926 src/DialogPeer.cpp:990 msgid "Source" msgstr "" #: src/DialogPeer.cpp:932 msgid "SaveAs" msgstr "" #: src/DialogPeer.cpp:937 src/DialogPeer.cpp:1000 src/MainWindow.cpp:1213 #: src/ShareFile.cpp:280 msgid "Size" msgstr "" #: src/DialogPeer.cpp:995 msgid "Name" msgstr "" #: src/DialogPeer.cpp:1096 src/DialogPeer.cpp:1169 #, c-format msgid "Receiving Progress." msgstr "" #: src/DialogPeer.cpp:1099 src/DialogPeer.cpp:1172 #, c-format msgid "%s to Receive." msgstr "" #: src/DialogPeer.cpp:1103 src/DialogPeer.cpp:1176 #, c-format msgid "%s Of %s Received." msgstr "" #: src/DialogPeer.cpp:1109 #, c-format msgid "Mission Completed!" msgstr "" #: src/DialogPeer.cpp:1321 msgid "Remove Selected" msgstr "" #: src/HelpDialog.cpp:61 src/HelpDialog.cpp:66 msgid "Jally " msgstr "" #: src/HelpDialog.cpp:62 src/HelpDialog.cpp:68 msgid "ManPT " msgstr "" #: src/HelpDialog.cpp:67 msgid "LiWeijian " msgstr "" #: src/HelpDialog.cpp:71 msgid "" "alick \n" "ManPT " msgstr "" #: src/HelpDialog.cpp:80 src/MainWindow.cpp:576 src/StatusIcon.cpp:106 #: src/StatusIcon.cpp:277 msgid "iptux" msgstr "iptux" #: src/HelpDialog.cpp:85 msgid "A GTK+ based LAN Messenger." msgstr "" #: src/HelpDialog.cpp:102 msgid "Help" msgstr "" #: src/HelpDialog.cpp:102 msgid "Contributers" msgstr "" #: src/HelpDialog.cpp:102 src/HelpDialog.cpp:120 msgid "..." msgstr "" #: src/HelpDialog.cpp:104 msgid "" "Project Home: \n" "https://github.com/iptux-src/iptux\n" "\n" "User and Developer Group: \n" "https://groups.google.com/group/iptux/\n" "\n" "Note that you can get help form the project wiki page.\n" "\n" "If you find no solutions in any of the existed documents, feel free to drop " "a email at iptux@googlegroups.com, lots of users and developers would be " "glade to help about your problems." msgstr "" #: src/HelpDialog.cpp:110 msgid "" "It's an honor that iptux was contributed voluntarilly by many people. " "Without your help, iptux could never make it.\n" "\n" "Especially, Here's some we would like to thank much:\n" "\n" "ChenGang\n" "\n" "\n" "\n" "\n" "\n" "..." msgstr "" #: src/HelpDialog.cpp:128 msgid "More About Iptux" msgstr "" #: src/LogSystem.cpp:53 #, c-format msgid "Recevied-From: Nickname:%s User:%s Host:%s" msgstr "" #: src/LogSystem.cpp:57 #, c-format msgid "Send-To: Nickname:%s User:%s Host:%s" msgstr "" #: src/LogSystem.cpp:60 msgid "Send-Broadcast" msgstr "" #: src/LogSystem.cpp:83 #, c-format msgid "User:%s Host:%s" msgstr "" #: src/MainWindow.cpp:603 msgid "Files Transmission Management" msgstr "" #: src/MainWindow.cpp:718 msgid "Pals Online: 0" msgstr "" #: src/MainWindow.cpp:801 msgid "Search Pals" msgstr "" #: src/MainWindow.cpp:824 src/StatusIcon.cpp:185 msgid "_Detect" msgstr "_Erkennen" #: src/MainWindow.cpp:833 msgid "_Find" msgstr "_Suchen" #: src/MainWindow.cpp:845 src/StatusIcon.cpp:194 msgid "_Quit" msgstr "_Beenden" #: src/MainWindow.cpp:871 src/StatusIcon.cpp:164 msgid "_Preferences" msgstr "" #: src/MainWindow.cpp:880 src/StatusIcon.cpp:156 msgid "_Transmission" msgstr "" #: src/MainWindow.cpp:889 src/StatusIcon.cpp:173 msgid "_Shared Management" msgstr "" #: src/MainWindow.cpp:898 msgid "_Sort" msgstr "" #: src/MainWindow.cpp:936 msgid "_Update" msgstr "_Aktualisieren" #: src/MainWindow.cpp:953 msgid "http://code.google.com/p/iptux/wiki/FAQ?wl=en" msgstr "" #: src/MainWindow.cpp:957 msgid "_Help" msgstr "_Hilfe" #: src/MainWindow.cpp:965 msgid "_More" msgstr "" #: src/MainWindow.cpp:969 msgid "_FAQ" msgstr "" #: src/MainWindow.cpp:1121 msgid "Nickname" msgstr "" #: src/MainWindow.cpp:1132 msgid "Group" msgstr "" #: src/MainWindow.cpp:1138 src/MainWindow.cpp:1201 msgid "IPv4" msgstr "IPv4" #: src/MainWindow.cpp:1144 msgid "User" msgstr "" #: src/MainWindow.cpp:1150 msgid "Host" msgstr "" #: src/MainWindow.cpp:1183 msgid "State" msgstr "" #: src/MainWindow.cpp:1189 msgid "Task" msgstr "" #: src/MainWindow.cpp:1195 msgid "Peer" msgstr "" #: src/MainWindow.cpp:1207 msgid "Filename" msgstr "" #: src/MainWindow.cpp:1219 msgid "Completed" msgstr "" #: src/MainWindow.cpp:1225 msgid "Progress" msgstr "" #: src/MainWindow.cpp:1231 msgid "Cost" msgstr "" #: src/MainWindow.cpp:1237 msgid "Remaining" msgstr "" #: src/MainWindow.cpp:1243 msgid "Rate" msgstr "" #: src/MainWindow.cpp:1534 msgid "Open This File" msgstr "" #: src/MainWindow.cpp:1540 msgid "Open Containing Folder" msgstr "" #: src/MainWindow.cpp:1546 msgid "Terminate Task" msgstr "" #: src/MainWindow.cpp:1551 msgid "Terminate All" msgstr "Alle abbrechen" #: src/MainWindow.cpp:1556 msgid "Clear Tasklist" msgstr "Aufgabenliste leeren" #: src/MainWindow.cpp:1577 msgid "Send Message" msgstr "Nachricht senden" #: src/MainWindow.cpp:1611 msgid "Change Info." msgstr "" #: src/MainWindow.cpp:1626 msgid "Delete Pal" msgstr "Freund löschen" #: src/MainWindow.cpp:1715 #, c-format msgid "Pals Online: %" msgstr "" #: src/MainWindow.cpp:1946 msgid "The file you want to open not exist!" msgstr "" #: src/MainWindow.cpp:1975 msgid "The path you want to open not exist!" msgstr "" #: src/output.cpp:35 msgid "Infomation" msgstr "Information" #: src/output.cpp:60 msgid "Warning" msgstr "Warnung" #: src/output.cpp:83 msgid "Error" msgstr "Fehler" #: src/ProgramData.cpp:216 msgid "utf-16" msgstr "" #: src/ProgramData.cpp:219 msgid "utf-8" msgstr "" #: src/RecvFileData.cpp:117 msgid "receive" msgstr "empfangen" #: src/RecvFileData.cpp:184 #, c-format msgid "Failed to receive the file \"%s\" from %s!" msgstr "" #: src/RecvFileData.cpp:187 #, c-format msgid "Receive the file \"%s\" from %s successfully!" msgstr "" #: src/RecvFileData.cpp:332 #, c-format msgid "Failed to receive the directory \"%s\" from %s!" msgstr "" #: src/RecvFileData.cpp:335 #, c-format msgid "Receive the directory \"%s\" from %s successfully!" msgstr "" #: src/RevisePal.cpp:97 msgid "Change Pal's Information" msgstr "" #: src/RevisePal.cpp:125 msgid "Pal's nickname:" msgstr "Nickname des Freundes" #: src/RevisePal.cpp:131 msgid "Please input pal's new nickname!" msgstr "Bitte geben Sie den neuen Nicknamen des Freundes ein!" #: src/RevisePal.cpp:137 msgid "Pal's group name:" msgstr "Gruppenname des Freundes:" #: src/RevisePal.cpp:143 msgid "Please input pal's new group name!" msgstr "Bitte geben Sie den neuen Gruppennamen des Freundes ein!" #: src/RevisePal.cpp:149 msgid "System coding:" msgstr "" #: src/RevisePal.cpp:155 msgid "Be SURE to know what you are doing!" msgstr "" #: src/RevisePal.cpp:161 msgid "Pal's face picture:" msgstr "" #: src/RevisePal.cpp:175 msgid "Be compatible with iptux's protocol (DANGEROUS)" msgstr "" #: src/SendFileData.cpp:117 msgid "send" msgstr "Senden" #: src/SendFileData.cpp:162 #, c-format msgid "Failed to send the file \"%s\" to %s!" msgstr "" #: src/SendFileData.cpp:165 #, c-format msgid "Send the file \"%s\" to %s successfully!" msgstr "" #: src/SendFileData.cpp:290 #, c-format msgid "Failed to send the directory \"%s\" to %s!" msgstr "" #: src/SendFileData.cpp:293 #, c-format msgid "Send the directory \"%s\" to %s successfully!" msgstr "" #: src/ShareFile.cpp:102 msgid "Shared Files Management" msgstr "" #: src/ShareFile.cpp:105 msgid "OK" msgstr "Ok" #: src/ShareFile.cpp:106 msgid "Apply" msgstr "Übernehmen" #: src/ShareFile.cpp:150 msgid "Add Files" msgstr "Dateien hinzufügen" #: src/ShareFile.cpp:153 msgid "Add Folders" msgstr "Ordner hinzufügen" #: src/ShareFile.cpp:156 msgid "Delete Resources" msgstr "" #: src/ShareFile.cpp:159 msgid "Clear Password" msgstr "" #: src/ShareFile.cpp:162 msgid "Set Password" msgstr "" #: src/ShareFile.cpp:220 src/ShareFile.cpp:378 msgid "regular" msgstr "regelmäßig" #: src/ShareFile.cpp:224 src/ShareFile.cpp:382 msgid "directory" msgstr "Ordner" #: src/ShareFile.cpp:270 msgid "File" msgstr "" #: src/ShareFile.cpp:286 msgid "Type" msgstr "" #: src/ShareFile.cpp:422 msgid "Choose the files to share" msgstr "" #: src/ShareFile.cpp:425 msgid "Choose the folders to share" msgstr "" #: src/SoundSystem.cpp:153 #, c-format msgid "Failed to play the prompt tone, %s\n" msgstr "" #: src/StatusIcon.cpp:102 src/StatusIcon.cpp:274 #, c-format msgid "To be read: %u messages" msgstr "" #: src/StatusIcon.cpp:143 msgid "_Hide" msgstr "_Verstecken" #: src/StatusIcon.cpp:145 msgid "_Show" msgstr "_Zeigen" #: src/support.cpp:44 msgid "Loading the process successfully!" msgstr "" #: src/support.cpp:63 msgid "The process is about to quit!" msgstr "" #: src/support.cpp:102 #, c-format msgid "iptux: A software for sharing in LAN\n" msgstr "" #: src/support.cpp:103 #, c-format msgid "" "\t-h --help\n" "\t\tdisplay this help and exit\n" msgstr "" #: src/support.cpp:104 #, c-format msgid "" "\t-v --version\n" "\t\toutput version information and exit\n" msgstr "" #: src/support.cpp:120 #, c-format msgid "What do you want to do?\n" msgstr "" #: src/support.cpp:149 msgid "Can't find any available web browser!\n" msgstr "" #: src/support.cpp:179 #, c-format msgid "" "Fatal Error!!\n" "Failed to bind the TCP/UDP port(2425)!\n" "%s" msgstr "" #: src/UdpData.cpp:133 src/UdpData.cpp:134 src/UdpData.cpp:569 #: src/UdpData.cpp:606 msgid "mysterious" msgstr "" #: src/uninstall/utils.cpp:23 msgid "The user is not privileged!\n" msgstr "" #: src/uninstall/utils.cpp:34 #, c-format msgid "Opendir() directory \"%s\" failed, %s\n" msgstr "" #: src/uninstall/utils.cpp:45 #, c-format msgid "Stat() file \"%s\" failed, %s\n" msgstr "" #: src/uninstall/utils.cpp:51 src/uninstall/utils.cpp:67 #, c-format msgid "Unlink() file \"%s\" failed, %s\n" msgstr "" #: src/uninstall/utils.cpp:61 #, c-format msgid "Rmdir() directory \"%s\" failed, %s\n" msgstr "" #~ msgid "Chat History" #~ msgstr "Chatverlauf" #~ msgid "" #~ "\n" #~ "Can't send an empty message!!" #~ msgstr "" #~ "\n" #~ "Eine leere Nachricht kann nicht gesandt werden!!" iptux-0.6.3/po/en_GB.po000066400000000000000000000476201257720006400146350ustar00rootroot00000000000000# English (United Kingdom) translation for iptux # Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 # This file is distributed under the same license as the iptux package. # FIRST AUTHOR , 2009. # msgid "" msgstr "" "Project-Id-Version: iptux\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-02-06 19:16+0800\n" "PO-Revision-Date: 2010-03-26 00:17+0800\n" "Last-Translator: zhangjiejing \n" "Language-Team: English (United Kingdom) \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2009-10-31 13:28+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: src/AnalogFS.cpp:84 src/AnalogFS.cpp:89 #, c-format msgid "Open() file \"%s\" failed, %s" msgstr "" #: src/AnalogFS.cpp:109 #, c-format msgid "Stat64() file \"%s\" failed, %s" msgstr "" #: src/AnalogFS.cpp:130 #, c-format msgid "Mkdir() directory \"%s\" failed, %s" msgstr "" #: src/AnalogFS.cpp:145 #, c-format msgid "opendir on \"%s\" failed: %s" msgstr "" #: src/AnalogFS.cpp:191 #, c-format msgid "Opendir() directory \"%s\" failed, %s" msgstr "" #: src/Command.cpp:221 msgid "Your pal didn't receive the packet. He or she is offline maybe." msgstr "" #: src/CoreThread.cpp:231 src/DialogPeer.cpp:762 src/RecvFileData.cpp:152 #: src/RecvFileData.cpp:212 src/support.cpp:166 #, c-format msgid "" "Fatal Error!!\n" "Failed to create new socket!\n" "%s" msgstr "" #: src/CoreThread.cpp:556 src/CoreThread.cpp:581 src/CoreThread.cpp:1121 #: src/CoreThread.cpp:1147 msgid "Others" msgstr "" #: src/CoreThread.cpp:980 src/RecvFileData.cpp:133 src/RecvFileData.cpp:265 #: src/SendFileData.cpp:134 src/SendFileData.cpp:221 src/ShareFile.cpp:228 #: src/ShareFile.cpp:386 msgid "unknown" msgstr "" #: src/CoreThread.cpp:994 msgid "" msgstr "" #: src/CoreThread.cpp:1171 msgid "Broadcast" msgstr "" #: src/DataSettings.cpp:56 msgid "Personal" msgstr "" #: src/DataSettings.cpp:58 msgid "System" msgstr "" #: src/DataSettings.cpp:61 msgid "Sound" msgstr "" #: src/DataSettings.cpp:64 msgid "Network" msgstr "" #: src/DataSettings.cpp:148 msgid "Preferences" msgstr "" #: src/DataSettings.cpp:178 msgid "Your nickname:" msgstr "" #: src/DataSettings.cpp:184 msgid "Please input your nickname!" msgstr "" #: src/DataSettings.cpp:189 msgid "Your group name:" msgstr "" #: src/DataSettings.cpp:195 msgid "Please input your group name!" msgstr "" #: src/DataSettings.cpp:200 msgid "Your face picture:" msgstr "" #: src/DataSettings.cpp:213 msgid "Save files to: " msgstr "" #: src/DataSettings.cpp:223 msgid "Photo" msgstr "" #: src/DataSettings.cpp:235 msgid "Signature" msgstr "" #: src/DataSettings.cpp:266 msgid "Candidate network coding:" msgstr "" #: src/DataSettings.cpp:272 msgid "Candidate network coding" msgstr "" #: src/DataSettings.cpp:277 msgid "Preference network coding:" msgstr "" #: src/DataSettings.cpp:283 msgid "" "Preference network coding (You should be aware of what you are doing if you " "want to modify it.)" msgstr "" #: src/DataSettings.cpp:289 msgid "Pal's default face picture:" msgstr "" #: src/DataSettings.cpp:302 msgid "Panel font:" msgstr "" #: src/DataSettings.cpp:310 msgid "Automatically open the chat dialog" msgstr "" #: src/DataSettings.cpp:315 msgid "Automatically hide the panel after login" msgstr "" #: src/DataSettings.cpp:320 msgid "Automatically open the File Transmission Management" msgstr "" #: src/DataSettings.cpp:325 msgid "Use the 'Enter' key to send message" msgstr "" #: src/DataSettings.cpp:330 msgid "Automatically clean up the chat history" msgstr "" #: src/DataSettings.cpp:335 msgid "Save the chat history" msgstr "" #: src/DataSettings.cpp:340 msgid "Use the Blacklist (NOT recommended)" msgstr "" #: src/DataSettings.cpp:345 msgid "Filter the request of sharing files" msgstr "" #: src/DataSettings.cpp:367 msgid "Activate the sound support" msgstr "" #: src/DataSettings.cpp:374 msgid "Volume Control: " msgstr "" #: src/DataSettings.cpp:383 msgid "Sound Event" msgstr "" #: src/DataSettings.cpp:411 msgid "Test" msgstr "" #: src/DataSettings.cpp:414 msgid "Stop" msgstr "" #: src/DataSettings.cpp:437 msgid "From:" msgstr "" #: src/DataSettings.cpp:443 msgid "Beginning of the IP(v4) section" msgstr "" #: src/DataSettings.cpp:446 msgid "To:" msgstr "" #: src/DataSettings.cpp:452 msgid "End of the IP(v4) section" msgstr "" #: src/DataSettings.cpp:459 msgid "Add" msgstr "" #: src/DataSettings.cpp:463 msgid "Delete" msgstr "" #: src/DataSettings.cpp:469 msgid "Added IP(v4) Section:" msgstr "" #: src/DataSettings.cpp:488 msgid "Import" msgstr "" #: src/DataSettings.cpp:491 msgid "Export" msgstr "" #: src/DataSettings.cpp:494 msgid "Clear" msgstr "" #: src/DataSettings.cpp:709 msgid "Transfer finished" msgstr "" #: src/DataSettings.cpp:714 msgid "Message received" msgstr "" #: src/DataSettings.cpp:775 msgid "Play" msgstr "" #: src/DataSettings.cpp:782 msgid "Event" msgstr "" #: src/DataSettings.cpp:816 msgid "From" msgstr "" #: src/DataSettings.cpp:822 msgid "To" msgstr "" #: src/DataSettings.cpp:830 msgid "Description" msgstr "" #: src/DataSettings.cpp:847 msgid "Please select download folder" msgstr "" #: src/DataSettings.cpp:869 msgid "Select Font" msgstr "" #: src/DataSettings.cpp:882 msgid "Please select a sound file" msgstr "" #: src/DataSettings.cpp:1157 src/DataSettings.cpp:1189 #, c-format msgid "" "Fopen() file \"%s\" failed!\n" "%s" msgstr "" #: src/DataSettings.cpp:1238 src/DialogGroup.cpp:647 msgid "Select All" msgstr "" #: src/DataSettings.cpp:1243 src/DialogGroup.cpp:652 msgid "Reverse Select" msgstr "" #: src/DataSettings.cpp:1248 src/DialogGroup.cpp:657 msgid "Clear Up" msgstr "" #: src/DataSettings.cpp:1342 src/RevisePal.cpp:426 msgid "Please select a face picture" msgstr "" #: src/DataSettings.cpp:1365 msgid "Please select a personal photo" msgstr "" #: src/DataSettings.cpp:1509 src/DataSettings.cpp:1516 src/DetectPal.cpp:122 #, c-format msgid "" "\n" "Illegal IP(v4) address: %s!" msgstr "" #: src/DataSettings.cpp:1614 msgid "Please select a file to import data" msgstr "" #: src/DataSettings.cpp:1662 msgid "Save data to file" msgstr "" #: src/DetectPal.cpp:70 msgid "Detect pals" msgstr "" #: src/DetectPal.cpp:72 msgid "Detect" msgstr "" #: src/DetectPal.cpp:73 src/ShareFile.cpp:107 msgid "Cancel" msgstr "" #: src/DetectPal.cpp:91 msgid "Please input an IP address (IPv4 only):" msgstr "" #: src/DetectPal.cpp:99 msgid "Please input an IP address (IPv4 only)!" msgstr "" #: src/DetectPal.cpp:127 #, c-format msgid "The notification has been sent to %s." msgstr "" #: src/dialog.cpp:34 msgid "" "File transfer has not been completed.\n" "Are you sure to cancel and quit?" msgstr "" #: src/dialog.cpp:37 msgid "Confirm Exit" msgstr "" #: src/dialog.cpp:57 src/DialogPeer.cpp:379 src/MainWindow.cpp:1597 msgid "Request Shared Resources" msgstr "" #: src/dialog.cpp:60 msgid "Agree" msgstr "" #: src/dialog.cpp:61 src/DialogPeer.cpp:848 msgid "Refuse" msgstr "" #: src/dialog.cpp:74 #, c-format msgid "" "Your pal (%s)[%s]\n" "is requesting to get your shared resources,\n" "Do you agree?" msgstr "" #: src/dialog.cpp:103 msgid "Access Password" msgstr "" #: src/dialog.cpp:110 msgid "Please input the password for the shared files behind" msgstr "" #: src/dialog.cpp:123 #, c-format msgid "(%s)[%s]Password:" msgstr "" #: src/dialog.cpp:140 src/dialog.cpp:200 msgid "" "\n" "Empty Password!" msgstr "" #: src/dialog.cpp:163 msgid "Enter a New Password" msgstr "" #: src/dialog.cpp:173 msgid "Password: " msgstr "" #: src/dialog.cpp:181 msgid "Repeat: " msgstr "" #: src/dialog.cpp:195 msgid "" "\n" "Password Mismatched!" msgstr "" #: src/dialog.cpp:226 msgid "Please select a folder to save files." msgstr "" #: src/DialogGroup.cpp:277 #, c-format msgid "Talk with the group %s" msgstr "" #: src/DialogGroup.cpp:371 msgid "Member" msgstr "" #: src/DialogGroup.cpp:465 msgid "Send" msgstr "" #: src/DialogGroup.cpp:472 msgid "Pals" msgstr "" #: src/DialogGroup.cpp:495 src/DialogPeer.cpp:409 src/MainWindow.cpp:865 msgid "_Tools" msgstr "" #: src/DialogGroup.cpp:501 src/DialogPeer.cpp:417 msgid "Clear Buffer" msgstr "" #: src/DialogGroup.cpp:508 msgid "Sort" msgstr "" #: src/DialogGroup.cpp:514 src/MainWindow.cpp:904 msgid "By Nickname" msgstr "" #: src/DialogGroup.cpp:521 src/MainWindow.cpp:911 msgid "By IP" msgstr "" #: src/DialogGroup.cpp:531 src/MainWindow.cpp:921 msgid "Ascending" msgstr "" #: src/DialogGroup.cpp:538 src/MainWindow.cpp:928 msgid "Descending" msgstr "" #: src/DialogPeer.cpp:231 #, c-format msgid "Talk with %s(%s) IP:%s" msgstr "" #: src/DialogPeer.cpp:329 msgid "Info." msgstr "" #: src/DialogPeer.cpp:363 src/MainWindow.cpp:819 msgid "_File" msgstr "" #: src/DialogPeer.cpp:367 msgid "Attach File" msgstr "" #: src/DialogPeer.cpp:373 msgid "Attach Folder" msgstr "" #: src/DialogPeer.cpp:389 msgid "Close" msgstr "" #: src/DialogPeer.cpp:413 msgid "Insert Picture" msgstr "" #: src/DialogPeer.cpp:438 src/MainWindow.cpp:1653 #, c-format msgid "Version: %s\n" msgstr "" #: src/DialogPeer.cpp:442 src/MainWindow.cpp:1657 #, c-format msgid "Nickname: %s@%s\n" msgstr "" #: src/DialogPeer.cpp:444 src/MainWindow.cpp:1659 #, c-format msgid "Nickname: %s\n" msgstr "" #: src/DialogPeer.cpp:447 src/MainWindow.cpp:1662 #, c-format msgid "User: %s\n" msgstr "" #: src/DialogPeer.cpp:450 src/MainWindow.cpp:1665 #, c-format msgid "Host: %s\n" msgstr "" #: src/DialogPeer.cpp:455 src/MainWindow.cpp:1670 #, c-format msgid "Address: %s(%s)\n" msgstr "" #: src/DialogPeer.cpp:457 src/MainWindow.cpp:1672 #, c-format msgid "Address: %s\n" msgstr "" #: src/DialogPeer.cpp:461 src/MainWindow.cpp:1676 #, c-format msgid "Compatibility: Microsoft\n" msgstr "" #: src/DialogPeer.cpp:463 src/MainWindow.cpp:1678 #, c-format msgid "Compatibility: GNU/Linux\n" msgstr "" #: src/DialogPeer.cpp:466 src/MainWindow.cpp:1681 #, c-format msgid "System coding: %s\n" msgstr "" #: src/DialogPeer.cpp:470 src/MainWindow.cpp:1685 msgid "Signature:\n" msgstr "" #: src/DialogPeer.cpp:477 msgid "" "\n" "Photo:\n" msgstr "" #: src/DialogPeer.cpp:722 msgid "Please select a picture to insert the buffer" msgstr "" #: src/DialogPeer.cpp:789 msgid "Enclosure." msgstr "" #: src/DialogPeer.cpp:836 msgid "File to be receive." msgstr "" #: src/DialogPeer.cpp:840 msgid "Receiving progress." msgstr "" #: src/DialogPeer.cpp:843 msgid "Accept" msgstr "" #: src/DialogPeer.cpp:853 msgid "Detial" msgstr "" #: src/DialogPeer.cpp:884 msgid "File received." msgstr "" #: src/DialogPeer.cpp:926 src/DialogPeer.cpp:990 msgid "Source" msgstr "" #: src/DialogPeer.cpp:932 msgid "SaveAs" msgstr "" #: src/DialogPeer.cpp:937 src/DialogPeer.cpp:1000 src/MainWindow.cpp:1213 #: src/ShareFile.cpp:280 msgid "Size" msgstr "" #: src/DialogPeer.cpp:995 msgid "Name" msgstr "" #: src/DialogPeer.cpp:1096 src/DialogPeer.cpp:1169 #, c-format msgid "Receiving Progress." msgstr "" #: src/DialogPeer.cpp:1099 src/DialogPeer.cpp:1172 #, c-format msgid "%s to Receive." msgstr "" #: src/DialogPeer.cpp:1103 src/DialogPeer.cpp:1176 #, c-format msgid "%s Of %s Received." msgstr "" #: src/DialogPeer.cpp:1109 #, c-format msgid "Mission Completed!" msgstr "" #: src/DialogPeer.cpp:1321 msgid "Remove Selected" msgstr "" #: src/HelpDialog.cpp:61 src/HelpDialog.cpp:66 msgid "Jally " msgstr "" #: src/HelpDialog.cpp:62 src/HelpDialog.cpp:68 msgid "ManPT " msgstr "" #: src/HelpDialog.cpp:67 msgid "LiWeijian " msgstr "" #: src/HelpDialog.cpp:71 msgid "" "alick \n" "ManPT " msgstr "" #: src/HelpDialog.cpp:80 src/MainWindow.cpp:576 src/StatusIcon.cpp:106 #: src/StatusIcon.cpp:277 msgid "iptux" msgstr "" #: src/HelpDialog.cpp:85 msgid "A GTK+ based LAN Messenger." msgstr "" #: src/HelpDialog.cpp:102 msgid "Help" msgstr "" #: src/HelpDialog.cpp:102 msgid "Contributers" msgstr "" #: src/HelpDialog.cpp:102 src/HelpDialog.cpp:120 msgid "..." msgstr "" #: src/HelpDialog.cpp:104 msgid "" "Project Home: \n" "https://github.com/iptux-src/iptux\n" "\n" "User and Developer Group: \n" "https://groups.google.com/group/iptux/\n" "\n" "Note that you can get help form the project wiki page.\n" "\n" "If you find no solutions in any of the existed documents, feel free to drop " "a email at iptux@googlegroups.com, lots of users and developers would be " "glade to help about your problems." msgstr "" #: src/HelpDialog.cpp:110 msgid "" "It's an honor that iptux was contributed voluntarilly by many people. " "Without your help, iptux could never make it.\n" "\n" "Especially, Here's some we would like to thank much:\n" "\n" "ChenGang\n" "\n" "\n" "\n" "\n" "\n" "..." msgstr "" #: src/HelpDialog.cpp:128 msgid "More About Iptux" msgstr "" #: src/LogSystem.cpp:53 #, c-format msgid "Recevied-From: Nickname:%s User:%s Host:%s" msgstr "" #: src/LogSystem.cpp:57 #, c-format msgid "Send-To: Nickname:%s User:%s Host:%s" msgstr "" #: src/LogSystem.cpp:60 msgid "Send-Broadcast" msgstr "" #: src/LogSystem.cpp:83 #, c-format msgid "User:%s Host:%s" msgstr "" #: src/MainWindow.cpp:603 msgid "Files Transmission Management" msgstr "" #: src/MainWindow.cpp:718 msgid "Pals Online: 0" msgstr "" #: src/MainWindow.cpp:801 msgid "Search Pals" msgstr "" #: src/MainWindow.cpp:824 src/StatusIcon.cpp:185 msgid "_Detect" msgstr "" #: src/MainWindow.cpp:833 msgid "_Find" msgstr "" #: src/MainWindow.cpp:845 src/StatusIcon.cpp:194 msgid "_Quit" msgstr "" #: src/MainWindow.cpp:871 src/StatusIcon.cpp:164 msgid "_Preferences" msgstr "" #: src/MainWindow.cpp:880 src/StatusIcon.cpp:156 msgid "_Transmission" msgstr "" #: src/MainWindow.cpp:889 src/StatusIcon.cpp:173 msgid "_Shared Management" msgstr "" #: src/MainWindow.cpp:898 msgid "_Sort" msgstr "" #: src/MainWindow.cpp:936 msgid "_Update" msgstr "" #: src/MainWindow.cpp:953 msgid "http://code.google.com/p/iptux/wiki/FAQ?wl=en" msgstr "" #: src/MainWindow.cpp:957 msgid "_Help" msgstr "" #: src/MainWindow.cpp:965 msgid "_More" msgstr "" #: src/MainWindow.cpp:969 msgid "_FAQ" msgstr "" #: src/MainWindow.cpp:1121 msgid "Nickname" msgstr "" #: src/MainWindow.cpp:1132 msgid "Group" msgstr "" #: src/MainWindow.cpp:1138 src/MainWindow.cpp:1201 msgid "IPv4" msgstr "" #: src/MainWindow.cpp:1144 msgid "User" msgstr "" #: src/MainWindow.cpp:1150 msgid "Host" msgstr "" #: src/MainWindow.cpp:1183 msgid "State" msgstr "" #: src/MainWindow.cpp:1189 msgid "Task" msgstr "" #: src/MainWindow.cpp:1195 msgid "Peer" msgstr "" #: src/MainWindow.cpp:1207 msgid "Filename" msgstr "" #: src/MainWindow.cpp:1219 msgid "Completed" msgstr "" #: src/MainWindow.cpp:1225 msgid "Progress" msgstr "" #: src/MainWindow.cpp:1231 msgid "Cost" msgstr "" #: src/MainWindow.cpp:1237 msgid "Remaining" msgstr "" #: src/MainWindow.cpp:1243 msgid "Rate" msgstr "" #: src/MainWindow.cpp:1534 msgid "Open This File" msgstr "" #: src/MainWindow.cpp:1540 msgid "Open Containing Folder" msgstr "" #: src/MainWindow.cpp:1546 msgid "Terminate Task" msgstr "" #: src/MainWindow.cpp:1551 msgid "Terminate All" msgstr "" #: src/MainWindow.cpp:1556 msgid "Clear Tasklist" msgstr "" #: src/MainWindow.cpp:1577 msgid "Send Message" msgstr "" #: src/MainWindow.cpp:1611 msgid "Change Info." msgstr "" #: src/MainWindow.cpp:1626 msgid "Delete Pal" msgstr "" #: src/MainWindow.cpp:1715 #, c-format msgid "Pals Online: %" msgstr "" #: src/MainWindow.cpp:1946 msgid "The file you want to open not exist!" msgstr "" #: src/MainWindow.cpp:1975 msgid "The path you want to open not exist!" msgstr "" #: src/output.cpp:35 msgid "Infomation" msgstr "" #: src/output.cpp:60 msgid "Warning" msgstr "" #: src/output.cpp:83 msgid "Error" msgstr "" #: src/ProgramData.cpp:216 msgid "utf-16" msgstr "" #: src/ProgramData.cpp:219 msgid "utf-8" msgstr "" #: src/RecvFileData.cpp:117 msgid "receive" msgstr "" #: src/RecvFileData.cpp:184 #, c-format msgid "Failed to receive the file \"%s\" from %s!" msgstr "" #: src/RecvFileData.cpp:187 #, c-format msgid "Receive the file \"%s\" from %s successfully!" msgstr "" #: src/RecvFileData.cpp:332 #, c-format msgid "Failed to receive the directory \"%s\" from %s!" msgstr "" #: src/RecvFileData.cpp:335 #, c-format msgid "Receive the directory \"%s\" from %s successfully!" msgstr "" #: src/RevisePal.cpp:97 msgid "Change Pal's Information" msgstr "" #: src/RevisePal.cpp:125 msgid "Pal's nickname:" msgstr "" #: src/RevisePal.cpp:131 msgid "Please input pal's new nickname!" msgstr "" #: src/RevisePal.cpp:137 msgid "Pal's group name:" msgstr "" #: src/RevisePal.cpp:143 msgid "Please input pal's new group name!" msgstr "" #: src/RevisePal.cpp:149 msgid "System coding:" msgstr "" #: src/RevisePal.cpp:155 msgid "Be SURE to know what you are doing!" msgstr "" #: src/RevisePal.cpp:161 msgid "Pal's face picture:" msgstr "" #: src/RevisePal.cpp:175 msgid "Be compatible with iptux's protocol (DANGEROUS)" msgstr "" #: src/SendFileData.cpp:117 msgid "send" msgstr "" #: src/SendFileData.cpp:162 #, c-format msgid "Failed to send the file \"%s\" to %s!" msgstr "" #: src/SendFileData.cpp:165 #, c-format msgid "Send the file \"%s\" to %s successfully!" msgstr "" #: src/SendFileData.cpp:290 #, c-format msgid "Failed to send the directory \"%s\" to %s!" msgstr "" #: src/SendFileData.cpp:293 #, c-format msgid "Send the directory \"%s\" to %s successfully!" msgstr "" #: src/ShareFile.cpp:102 msgid "Shared Files Management" msgstr "" #: src/ShareFile.cpp:105 msgid "OK" msgstr "" #: src/ShareFile.cpp:106 msgid "Apply" msgstr "" #: src/ShareFile.cpp:150 msgid "Add Files" msgstr "" #: src/ShareFile.cpp:153 msgid "Add Folders" msgstr "" #: src/ShareFile.cpp:156 msgid "Delete Resources" msgstr "" #: src/ShareFile.cpp:159 msgid "Clear Password" msgstr "" #: src/ShareFile.cpp:162 msgid "Set Password" msgstr "" #: src/ShareFile.cpp:220 src/ShareFile.cpp:378 msgid "regular" msgstr "" #: src/ShareFile.cpp:224 src/ShareFile.cpp:382 msgid "directory" msgstr "" #: src/ShareFile.cpp:270 msgid "File" msgstr "" #: src/ShareFile.cpp:286 msgid "Type" msgstr "" #: src/ShareFile.cpp:422 msgid "Choose the files to share" msgstr "" #: src/ShareFile.cpp:425 msgid "Choose the folders to share" msgstr "" #: src/SoundSystem.cpp:153 #, c-format msgid "Failed to play the prompt tone, %s\n" msgstr "" #: src/StatusIcon.cpp:102 src/StatusIcon.cpp:274 #, c-format msgid "To be read: %u messages" msgstr "" #: src/StatusIcon.cpp:143 msgid "_Hide" msgstr "" #: src/StatusIcon.cpp:145 msgid "_Show" msgstr "" #: src/support.cpp:44 msgid "Loading the process successfully!" msgstr "" #: src/support.cpp:63 msgid "The process is about to quit!" msgstr "" #: src/support.cpp:102 #, c-format msgid "iptux: A software for sharing in LAN\n" msgstr "" #: src/support.cpp:103 #, c-format msgid "" "\t-h --help\n" "\t\tdisplay this help and exit\n" msgstr "" #: src/support.cpp:104 #, c-format msgid "" "\t-v --version\n" "\t\toutput version information and exit\n" msgstr "" #: src/support.cpp:120 #, c-format msgid "What do you want to do?\n" msgstr "" #: src/support.cpp:149 msgid "Can't find any available web browser!\n" msgstr "" #: src/support.cpp:179 #, c-format msgid "" "Fatal Error!!\n" "Failed to bind the TCP/UDP port(2425)!\n" "%s" msgstr "" #: src/UdpData.cpp:133 src/UdpData.cpp:134 src/UdpData.cpp:569 #: src/UdpData.cpp:606 msgid "mysterious" msgstr "" #: src/uninstall/utils.cpp:23 msgid "The user is not privileged!\n" msgstr "" #: src/uninstall/utils.cpp:34 #, c-format msgid "Opendir() directory \"%s\" failed, %s\n" msgstr "" #: src/uninstall/utils.cpp:45 #, c-format msgid "Stat() file \"%s\" failed, %s\n" msgstr "" #: src/uninstall/utils.cpp:51 src/uninstall/utils.cpp:67 #, c-format msgid "Unlink() file \"%s\" failed, %s\n" msgstr "" #: src/uninstall/utils.cpp:61 #, c-format msgid "Rmdir() directory \"%s\" failed, %s\n" msgstr "" #~ msgid "Chat History" #~ msgstr "Chat History" #~ msgid "" #~ "\n" #~ "Can't send an empty message!!" #~ msgstr "" #~ "\n" #~ "Can't send an empty message!!" iptux-0.6.3/po/es.po000066400000000000000000000644121257720006400142700ustar00rootroot00000000000000# Spanish translation for iptux # Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 # This file is distributed under the same license as the iptux package. # FIRST AUTHOR , 2009. # msgid "" msgstr "" "Project-Id-Version: iptux\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-02-06 19:16+0800\n" "PO-Revision-Date: 2013-06-05 13:46-0300\n" "Last-Translator: Fernando Toledo \n" "Language-Team: Spanish \n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2010-04-01 12:32+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: src/AnalogFS.cpp:84 src/AnalogFS.cpp:89 #, c-format msgid "Open() file \"%s\" failed, %s" msgstr "Open() archivo \"%s\" fallo, %s" #: src/AnalogFS.cpp:109 #, c-format msgid "Stat64() file \"%s\" failed, %s" msgstr "Stat64() archivo \"%s\" fallo, %s" #: src/AnalogFS.cpp:130 #, c-format msgid "Mkdir() directory \"%s\" failed, %s" msgstr "Mkdir() directorio \"%s\" fallo, %s" #: src/AnalogFS.cpp:145 #, fuzzy, c-format msgid "opendir on \"%s\" failed: %s" msgstr "Opendir() directorio \"%s\" fallo, %s" #: src/AnalogFS.cpp:191 #, c-format msgid "Opendir() directory \"%s\" failed, %s" msgstr "Opendir() directorio \"%s\" fallo, %s" #: src/Command.cpp:221 msgid "Your pal didn't receive the packet. He or she is offline maybe." msgstr "Su amigo no recibió el mensaje. El o ella quizás está desconectado." #: src/CoreThread.cpp:231 src/DialogPeer.cpp:762 src/RecvFileData.cpp:152 #: src/RecvFileData.cpp:212 src/support.cpp:166 #, c-format msgid "" "Fatal Error!!\n" "Failed to create new socket!\n" "%s" msgstr "" "Error Fatal!!\n" "Falló al crear el socket!\n" "%s" #: src/CoreThread.cpp:556 src/CoreThread.cpp:581 src/CoreThread.cpp:1121 #: src/CoreThread.cpp:1147 msgid "Others" msgstr "Otros" #: src/CoreThread.cpp:980 src/RecvFileData.cpp:133 src/RecvFileData.cpp:265 #: src/SendFileData.cpp:134 src/SendFileData.cpp:221 src/ShareFile.cpp:228 #: src/ShareFile.cpp:386 msgid "unknown" msgstr "desconocido" #: src/CoreThread.cpp:994 msgid "" msgstr "" #: src/CoreThread.cpp:1171 msgid "Broadcast" msgstr "Difusión" #: src/DataSettings.cpp:56 msgid "Personal" msgstr "Personal" #: src/DataSettings.cpp:58 msgid "System" msgstr "Sistema" #: src/DataSettings.cpp:61 msgid "Sound" msgstr "Sonido" #: src/DataSettings.cpp:64 msgid "Network" msgstr "Red" #: src/DataSettings.cpp:148 msgid "Preferences" msgstr "Preferencias" #: src/DataSettings.cpp:178 msgid "Your nickname:" msgstr "Su apodo:" #: src/DataSettings.cpp:184 msgid "Please input your nickname!" msgstr "Por favor ingrese su apodo!" #: src/DataSettings.cpp:189 msgid "Your group name:" msgstr "Su grupo:" #: src/DataSettings.cpp:195 msgid "Please input your group name!" msgstr "Por favor ingrese su grupo!" #: src/DataSettings.cpp:200 msgid "Your face picture:" msgstr "Su imagen:" #: src/DataSettings.cpp:213 msgid "Save files to: " msgstr "Guardar archivo en: " #: src/DataSettings.cpp:223 msgid "Photo" msgstr "Foto" #: src/DataSettings.cpp:235 msgid "Signature" msgstr "Firma" #: src/DataSettings.cpp:266 msgid "Candidate network coding:" msgstr "Codificación de red Candidata:" #: src/DataSettings.cpp:272 msgid "Candidate network coding" msgstr "Codificación de red Candidata:" #: src/DataSettings.cpp:277 msgid "Preference network coding:" msgstr "Codificación de red Preferida:" #: src/DataSettings.cpp:283 msgid "" "Preference network coding (You should be aware of what you are doing if you " "want to modify it.)" msgstr "" "Codificación de red Preferida (Ud. debe saber lo que está por hacer si desea " "modificar ésta opción)" #: src/DataSettings.cpp:289 msgid "Pal's default face picture:" msgstr "Imagen por defecto de amigos:" #: src/DataSettings.cpp:302 msgid "Panel font:" msgstr "Fuente:" #: src/DataSettings.cpp:310 msgid "Automatically open the chat dialog" msgstr "Abrir automáticamente la ventana de chat" #: src/DataSettings.cpp:315 msgid "Automatically hide the panel after login" msgstr "Ocultar automáticamente el panel después de ingresar" #: src/DataSettings.cpp:320 msgid "Automatically open the File Transmission Management" msgstr "Abrir automáticamente el Administrador de Transferencias" #: src/DataSettings.cpp:325 msgid "Use the 'Enter' key to send message" msgstr "Usar la tecla 'Enter' para enviar mensaje" #: src/DataSettings.cpp:330 msgid "Automatically clean up the chat history" msgstr "Limpiar automáticamente el historial" #: src/DataSettings.cpp:335 msgid "Save the chat history" msgstr "Guardar el historial" #: src/DataSettings.cpp:340 msgid "Use the Blacklist (NOT recommended)" msgstr "Usar Blacklist (NO recomendado)" #: src/DataSettings.cpp:345 msgid "Filter the request of sharing files" msgstr "Filtrar pedido de archivos compartidos" #: src/DataSettings.cpp:367 msgid "Activate the sound support" msgstr "Activar soporte de sonido" #: src/DataSettings.cpp:374 msgid "Volume Control: " msgstr "Contro de Volumen: " #: src/DataSettings.cpp:383 msgid "Sound Event" msgstr "Eventos de Sonidos:" #: src/DataSettings.cpp:411 msgid "Test" msgstr "Prueba" #: src/DataSettings.cpp:414 msgid "Stop" msgstr "Detener" #: src/DataSettings.cpp:437 msgid "From:" msgstr "Desde:" #: src/DataSettings.cpp:443 msgid "Beginning of the IP(v4) section" msgstr "Comienzo de la sección IP (v4)" #: src/DataSettings.cpp:446 msgid "To:" msgstr "Para:" #: src/DataSettings.cpp:452 msgid "End of the IP(v4) section" msgstr "Fin de sección IP(v4):" #: src/DataSettings.cpp:459 msgid "Add" msgstr "Agregar" #: src/DataSettings.cpp:463 msgid "Delete" msgstr "Eliminar" #: src/DataSettings.cpp:469 msgid "Added IP(v4) Section:" msgstr "Secciones IP(v4) agregadas:" #: src/DataSettings.cpp:488 msgid "Import" msgstr "Importar" #: src/DataSettings.cpp:491 msgid "Export" msgstr "Exportar" #: src/DataSettings.cpp:494 msgid "Clear" msgstr "Limpiar" #: src/DataSettings.cpp:709 msgid "Transfer finished" msgstr "Transferencia finalizada" #: src/DataSettings.cpp:714 msgid "Message received" msgstr "Mensaje recibido" #: src/DataSettings.cpp:775 msgid "Play" msgstr "Reproducir" #: src/DataSettings.cpp:782 msgid "Event" msgstr "Evento" #: src/DataSettings.cpp:816 msgid "From" msgstr "Desde" #: src/DataSettings.cpp:822 msgid "To" msgstr "Hasta" #: src/DataSettings.cpp:830 msgid "Description" msgstr "Descripción" #: src/DataSettings.cpp:847 msgid "Please select download folder" msgstr "Por favor seleccione el directorio de descarga" #: src/DataSettings.cpp:869 msgid "Select Font" msgstr "Seleccionar tipografía" #: src/DataSettings.cpp:882 msgid "Please select a sound file" msgstr "Por favor seleccione un archivo de sonido" #: src/DataSettings.cpp:1157 src/DataSettings.cpp:1189 #, c-format msgid "" "Fopen() file \"%s\" failed!\n" "%s" msgstr "" "Fopen() archivo \"%s\" fallo!\n" "%s" #: src/DataSettings.cpp:1238 src/DialogGroup.cpp:647 msgid "Select All" msgstr "Seleccionar Todo" #: src/DataSettings.cpp:1243 src/DialogGroup.cpp:652 msgid "Reverse Select" msgstr "Selección Reversa" #: src/DataSettings.cpp:1248 src/DialogGroup.cpp:657 msgid "Clear Up" msgstr "Limpiar" #: src/DataSettings.cpp:1342 src/RevisePal.cpp:426 msgid "Please select a face picture" msgstr "Por favor seleccione una imagen" #: src/DataSettings.cpp:1365 msgid "Please select a personal photo" msgstr "Por favor seleccione una foto personal" #: src/DataSettings.cpp:1509 src/DataSettings.cpp:1516 src/DetectPal.cpp:122 #, c-format msgid "" "\n" "Illegal IP(v4) address: %s!" msgstr "" "\n" "Dirección IP(v4) inválida: %s!" #: src/DataSettings.cpp:1614 msgid "Please select a file to import data" msgstr "Seleccione un archivo para importar" #: src/DataSettings.cpp:1662 msgid "Save data to file" msgstr "Guardar datos a un archivo" #: src/DetectPal.cpp:70 msgid "Detect pals" msgstr "Detectar amigos" #: src/DetectPal.cpp:72 msgid "Detect" msgstr "Detectar" #: src/DetectPal.cpp:73 src/ShareFile.cpp:107 msgid "Cancel" msgstr "Cancelar" #: src/DetectPal.cpp:91 msgid "Please input an IP address (IPv4 only):" msgstr "Ingrese una dirección IP (IPv4 solamente):" #: src/DetectPal.cpp:99 msgid "Please input an IP address (IPv4 only)!" msgstr "Por favor Ingrese una dirección IP (IPv4 solamente)!" #: src/DetectPal.cpp:127 #, c-format msgid "The notification has been sent to %s." msgstr "Una notificación ha sido enviada a %s." #: src/dialog.cpp:34 msgid "" "File transfer has not been completed.\n" "Are you sure to cancel and quit?" msgstr "" "La transferencia de archivos no se ha completado.\n" "¿Está seguro que quiere cancelar y salir?" #: src/dialog.cpp:37 msgid "Confirm Exit" msgstr "Confirmar Salida" #: src/dialog.cpp:57 src/DialogPeer.cpp:379 src/MainWindow.cpp:1597 msgid "Request Shared Resources" msgstr "Pedir Recursos Compartidos" #: src/dialog.cpp:60 msgid "Agree" msgstr "De acuerdo" #: src/dialog.cpp:61 src/DialogPeer.cpp:848 msgid "Refuse" msgstr "Rechazar" #: src/dialog.cpp:74 #, c-format msgid "" "Your pal (%s)[%s]\n" "is requesting to get your shared resources,\n" "Do you agree?" msgstr "" "Su amigo (%s)[%s]\n" "ha pedido sus recursos compartidos,\n" "¿Está de acuerdo?" #: src/dialog.cpp:103 msgid "Access Password" msgstr "Clave de Acceso" #: src/dialog.cpp:110 msgid "Please input the password for the shared files behind" msgstr "Ingrese la clave para los archivos compartidos" #: src/dialog.cpp:123 #, c-format msgid "(%s)[%s]Password:" msgstr "(%s)[%s]Clave:" #: src/dialog.cpp:140 src/dialog.cpp:200 msgid "" "\n" "Empty Password!" msgstr "" "\n" "Clave vacía!" #: src/dialog.cpp:163 msgid "Enter a New Password" msgstr "Ingresar Nueva Clave" #: src/dialog.cpp:173 msgid "Password: " msgstr "Clave: " #: src/dialog.cpp:181 msgid "Repeat: " msgstr "Repetir: " #: src/dialog.cpp:195 msgid "" "\n" "Password Mismatched!" msgstr "" "\n" "Las claves son distintas!" #: src/dialog.cpp:226 #, fuzzy msgid "Please select a folder to save files." msgstr "Por favor seleccione un archivo de sonido" #: src/DialogGroup.cpp:277 #, c-format msgid "Talk with the group %s" msgstr "Hablar con el grupo %s" #: src/DialogGroup.cpp:371 msgid "Member" msgstr "Miembro" #: src/DialogGroup.cpp:465 msgid "Send" msgstr "Enviar" #: src/DialogGroup.cpp:472 msgid "Pals" msgstr "Amigos" #: src/DialogGroup.cpp:495 src/DialogPeer.cpp:409 src/MainWindow.cpp:865 msgid "_Tools" msgstr "_Herramientas" #: src/DialogGroup.cpp:501 src/DialogPeer.cpp:417 msgid "Clear Buffer" msgstr "Limpiar buffer" #: src/DialogGroup.cpp:508 msgid "Sort" msgstr "Ordenar" #: src/DialogGroup.cpp:514 src/MainWindow.cpp:904 msgid "By Nickname" msgstr "Por Apodo" #: src/DialogGroup.cpp:521 src/MainWindow.cpp:911 msgid "By IP" msgstr "Por IP" #: src/DialogGroup.cpp:531 src/MainWindow.cpp:921 msgid "Ascending" msgstr "Ascendente" #: src/DialogGroup.cpp:538 src/MainWindow.cpp:928 msgid "Descending" msgstr "Descendente" #: src/DialogPeer.cpp:231 #, fuzzy, c-format msgid "Talk with %s(%s) IP:%s" msgstr "Charla con %s" #: src/DialogPeer.cpp:329 msgid "Info." msgstr "Información." #: src/DialogPeer.cpp:363 src/MainWindow.cpp:819 msgid "_File" msgstr "_Archivo" #: src/DialogPeer.cpp:367 msgid "Attach File" msgstr "Adjuntar Archivo" #: src/DialogPeer.cpp:373 msgid "Attach Folder" msgstr "Adjuntar Directorio" #: src/DialogPeer.cpp:389 msgid "Close" msgstr "Cerrar" #: src/DialogPeer.cpp:413 msgid "Insert Picture" msgstr "Insertar Imagen" #: src/DialogPeer.cpp:438 src/MainWindow.cpp:1653 #, c-format msgid "Version: %s\n" msgstr "Versión: %s\n" #: src/DialogPeer.cpp:442 src/MainWindow.cpp:1657 #, c-format msgid "Nickname: %s@%s\n" msgstr "Apodo: %s@%s\n" #: src/DialogPeer.cpp:444 src/MainWindow.cpp:1659 #, c-format msgid "Nickname: %s\n" msgstr "Apodo: %s\n" #: src/DialogPeer.cpp:447 src/MainWindow.cpp:1662 #, c-format msgid "User: %s\n" msgstr "Usuario: %s\n" #: src/DialogPeer.cpp:450 src/MainWindow.cpp:1665 #, c-format msgid "Host: %s\n" msgstr "Equipo: %s\n" #: src/DialogPeer.cpp:455 src/MainWindow.cpp:1670 #, c-format msgid "Address: %s(%s)\n" msgstr "Dirección: %s(%s)\n" #: src/DialogPeer.cpp:457 src/MainWindow.cpp:1672 #, c-format msgid "Address: %s\n" msgstr "Dirección: %s\n" #: src/DialogPeer.cpp:461 src/MainWindow.cpp:1676 #, c-format msgid "Compatibility: Microsoft\n" msgstr "Compatibilidad: Micro$oft\n" #: src/DialogPeer.cpp:463 src/MainWindow.cpp:1678 #, c-format msgid "Compatibility: GNU/Linux\n" msgstr "Compatibilidad: GNU/Linux\n" #: src/DialogPeer.cpp:466 src/MainWindow.cpp:1681 #, c-format msgid "System coding: %s\n" msgstr "Codificación del Sistema: %s\n" #: src/DialogPeer.cpp:470 src/MainWindow.cpp:1685 msgid "Signature:\n" msgstr "Firma:\n" #: src/DialogPeer.cpp:477 msgid "" "\n" "Photo:\n" msgstr "" "\n" "Foto:\n" #: src/DialogPeer.cpp:722 msgid "Please select a picture to insert the buffer" msgstr "Seleccione una imagen para insertar en la conversación" #: src/DialogPeer.cpp:789 #, fuzzy msgid "Enclosure." msgstr "Anexo" #: src/DialogPeer.cpp:836 msgid "File to be receive." msgstr "" #: src/DialogPeer.cpp:840 msgid "Receiving progress." msgstr "" #: src/DialogPeer.cpp:843 msgid "Accept" msgstr "Aceptar" #: src/DialogPeer.cpp:853 msgid "Detial" msgstr "" #: src/DialogPeer.cpp:884 #, fuzzy msgid "File received." msgstr "Mensaje recibido" #: src/DialogPeer.cpp:926 src/DialogPeer.cpp:990 msgid "Source" msgstr "Origen" #: src/DialogPeer.cpp:932 msgid "SaveAs" msgstr "" #: src/DialogPeer.cpp:937 src/DialogPeer.cpp:1000 src/MainWindow.cpp:1213 #: src/ShareFile.cpp:280 msgid "Size" msgstr "Tamaño" #: src/DialogPeer.cpp:995 msgid "Name" msgstr "" #: src/DialogPeer.cpp:1096 src/DialogPeer.cpp:1169 #, c-format msgid "Receiving Progress." msgstr "" #: src/DialogPeer.cpp:1099 src/DialogPeer.cpp:1172 #, c-format msgid "%s to Receive." msgstr "" #: src/DialogPeer.cpp:1103 src/DialogPeer.cpp:1176 #, c-format msgid "%s Of %s Received." msgstr "" #: src/DialogPeer.cpp:1109 #, fuzzy, c-format msgid "Mission Completed!" msgstr "Completo" #: src/DialogPeer.cpp:1321 #, fuzzy msgid "Remove Selected" msgstr "Selección Reversa" #: src/HelpDialog.cpp:61 src/HelpDialog.cpp:66 msgid "Jally " msgstr "Jally " #: src/HelpDialog.cpp:62 src/HelpDialog.cpp:68 msgid "ManPT " msgstr "ManPT " #: src/HelpDialog.cpp:67 msgid "LiWeijian " msgstr "LiWeijian " #: src/HelpDialog.cpp:71 msgid "" "alick \n" "ManPT " msgstr "" "alick \n" "ManPT " #: src/HelpDialog.cpp:80 src/MainWindow.cpp:576 src/StatusIcon.cpp:106 #: src/StatusIcon.cpp:277 msgid "iptux" msgstr "iptux" #: src/HelpDialog.cpp:85 msgid "A GTK+ based LAN Messenger." msgstr "Un mensajero de red basando en GTK+." #: src/HelpDialog.cpp:102 msgid "Help" msgstr "Ayuda" #: src/HelpDialog.cpp:102 msgid "Contributers" msgstr "Contribuciones" #: src/HelpDialog.cpp:102 src/HelpDialog.cpp:120 msgid "..." msgstr "..." #: src/HelpDialog.cpp:104 #, fuzzy msgid "" "Project Home: \n" "https://github.com/iptux-src/iptux\n" "\n" "User and Developer Group: \n" "https://groups.google.com/group/iptux/\n" "\n" "Note that you can get help form the project wiki page.\n" "\n" "If you find no solutions in any of the existed documents, feel free to drop " "a email at iptux@googlegroups.com, lots of users and developers would be " "glade to help about your problems." msgstr "" "Sitio del Proyecto: \n" "http://code.google.com/p/iptux/\n" "\n" "Grupo para Usuarios y Desarrolladores: \n" "https://groups.google.com/group/iptux/\n" "\n" "Ud. puede obtener ayuda desde las páginas del wiki del proyecto.\n" "\n" "Si no encuentra solución en ninguno de los documentos existentes, envíe un " "correo electrónico a iptux@googlegroups.com, muchos usuarios y " "desarrolladores intentaran ayudarlo con sus problemas." #: src/HelpDialog.cpp:110 msgid "" "It's an honor that iptux was contributed voluntarilly by many people. " "Without your help, iptux could never make it.\n" "\n" "Especially, Here's some we would like to thank much:\n" "\n" "ChenGang\n" "\n" "\n" "\n" "\n" "\n" "..." msgstr "" "Es un honor que iptux tenga contribuciones voluntarias de muchos usuarios. " "Sin su ayuda, iptux nunca se pudo haber hecho.\n" "\n" "Especialmente, algunas personas a quien quiero agredecer mucho:\n" "\n" "ChenGang\n" "\n" "\n" "\n" "\n" "\n" "..." #: src/HelpDialog.cpp:128 msgid "More About Iptux" msgstr "Más Acerca de Iptux" #: src/LogSystem.cpp:53 #, c-format msgid "Recevied-From: Nickname:%s User:%s Host:%s" msgstr "Recibido-De: Apodo:%s Usuario:%s Equipo:%s" #: src/LogSystem.cpp:57 #, c-format msgid "Send-To: Nickname:%s User:%s Host:%s" msgstr "Enviado: Apodo:%s Usuario:%s Equipo:%s" #: src/LogSystem.cpp:60 msgid "Send-Broadcast" msgstr "Difusión" #: src/LogSystem.cpp:83 #, c-format msgid "User:%s Host:%s" msgstr "Usuario:%s Equipo:%s" #: src/MainWindow.cpp:603 msgid "Files Transmission Management" msgstr "Administrador de Transferencias" #: src/MainWindow.cpp:718 msgid "Pals Online: 0" msgstr "Amigos En Linea: 0" #: src/MainWindow.cpp:801 msgid "Search Pals" msgstr "Buscar Amigos" #: src/MainWindow.cpp:824 src/StatusIcon.cpp:185 msgid "_Detect" msgstr "_Detectar" #: src/MainWindow.cpp:833 msgid "_Find" msgstr "_Buscar" #: src/MainWindow.cpp:845 src/StatusIcon.cpp:194 msgid "_Quit" msgstr "_Salir" #: src/MainWindow.cpp:871 src/StatusIcon.cpp:164 msgid "_Preferences" msgstr "_Preferencias" #: src/MainWindow.cpp:880 src/StatusIcon.cpp:156 msgid "_Transmission" msgstr "_Transferencias" #: src/MainWindow.cpp:889 src/StatusIcon.cpp:173 msgid "_Shared Management" msgstr "Admini_strador de Compartidos" #: src/MainWindow.cpp:898 msgid "_Sort" msgstr "_Ordenar" #: src/MainWindow.cpp:936 msgid "_Update" msgstr "_Actualizar" #: src/MainWindow.cpp:953 #, fuzzy msgid "http://code.google.com/p/iptux/wiki/FAQ?wl=en" msgstr "http://code.google.com/p/iptux/wiki/FAQ_EnglishVersion" #: src/MainWindow.cpp:957 msgid "_Help" msgstr "_Ayuda" #: src/MainWindow.cpp:965 msgid "_More" msgstr "_Mas Acerca de" #: src/MainWindow.cpp:969 msgid "_FAQ" msgstr "_FAQ" #: src/MainWindow.cpp:1121 msgid "Nickname" msgstr "Apodo" #: src/MainWindow.cpp:1132 msgid "Group" msgstr "Grupo" #: src/MainWindow.cpp:1138 src/MainWindow.cpp:1201 msgid "IPv4" msgstr "IPv4" #: src/MainWindow.cpp:1144 msgid "User" msgstr "Usuario" #: src/MainWindow.cpp:1150 msgid "Host" msgstr "Equipo" #: src/MainWindow.cpp:1183 msgid "State" msgstr "Estado" #: src/MainWindow.cpp:1189 msgid "Task" msgstr "Tarea" #: src/MainWindow.cpp:1195 msgid "Peer" msgstr "Compañero" #: src/MainWindow.cpp:1207 msgid "Filename" msgstr "Nombre de archivo" #: src/MainWindow.cpp:1219 msgid "Completed" msgstr "Completo" #: src/MainWindow.cpp:1225 msgid "Progress" msgstr "Progreso" #: src/MainWindow.cpp:1231 msgid "Cost" msgstr "Costo" #: src/MainWindow.cpp:1237 msgid "Remaining" msgstr "Restante" #: src/MainWindow.cpp:1243 msgid "Rate" msgstr "Tasa" #: src/MainWindow.cpp:1534 msgid "Open This File" msgstr "Abrir este archivo" #: src/MainWindow.cpp:1540 msgid "Open Containing Folder" msgstr "Abrir carpeta contenedora" #: src/MainWindow.cpp:1546 msgid "Terminate Task" msgstr "Terminar Tarea" #: src/MainWindow.cpp:1551 msgid "Terminate All" msgstr "Terminar Todos" #: src/MainWindow.cpp:1556 msgid "Clear Tasklist" msgstr "Limpiar Tareas" #: src/MainWindow.cpp:1577 msgid "Send Message" msgstr "Enviar Mensaje" #: src/MainWindow.cpp:1611 msgid "Change Info." msgstr "Cambiar Información." #: src/MainWindow.cpp:1626 msgid "Delete Pal" msgstr "Eliminar Amigo" #: src/MainWindow.cpp:1715 #, c-format msgid "Pals Online: %" msgstr "Amigos En Linea: %" #: src/MainWindow.cpp:1946 msgid "The file you want to open not exist!" msgstr "" #: src/MainWindow.cpp:1975 msgid "The path you want to open not exist!" msgstr "" #: src/output.cpp:35 msgid "Infomation" msgstr "Información" #: src/output.cpp:60 msgid "Warning" msgstr "Aviso" #: src/output.cpp:83 msgid "Error" msgstr "Error" #: src/ProgramData.cpp:216 msgid "utf-16" msgstr "utf-16" #: src/ProgramData.cpp:219 msgid "utf-8" msgstr "utf-8" #: src/RecvFileData.cpp:117 msgid "receive" msgstr "recibir" #: src/RecvFileData.cpp:184 #, c-format msgid "Failed to receive the file \"%s\" from %s!" msgstr "Fallo al recibir el archivo \"%s\" desde %s!" #: src/RecvFileData.cpp:187 #, c-format msgid "Receive the file \"%s\" from %s successfully!" msgstr "Recibido correctamente el archivo \"%s\" desde %s !" #: src/RecvFileData.cpp:332 #, c-format msgid "Failed to receive the directory \"%s\" from %s!" msgstr "Fallo al recibir el directorio \"%s\" desde %s!" #: src/RecvFileData.cpp:335 #, c-format msgid "Receive the directory \"%s\" from %s successfully!" msgstr "Recibido correctamente el directorio \"%s\" desde %s !" #: src/RevisePal.cpp:97 msgid "Change Pal's Information" msgstr "Cambiar Información del Amigo" #: src/RevisePal.cpp:125 msgid "Pal's nickname:" msgstr "Apodo de amigo:" #: src/RevisePal.cpp:131 msgid "Please input pal's new nickname!" msgstr "Por favor ingrese nuevo apodo del amigo!" #: src/RevisePal.cpp:137 msgid "Pal's group name:" msgstr "Nombre de grupo del amigo:" #: src/RevisePal.cpp:143 msgid "Please input pal's new group name!" msgstr "Por favor ingrese un nuevo nombre de grupo del amigo!" #: src/RevisePal.cpp:149 msgid "System coding:" msgstr "Codificación del Sistema:" #: src/RevisePal.cpp:155 msgid "Be SURE to know what you are doing!" msgstr "Esté SEGURO de saber lo que va a hacer!" #: src/RevisePal.cpp:161 msgid "Pal's face picture:" msgstr "Imagen del amigo" #: src/RevisePal.cpp:175 msgid "Be compatible with iptux's protocol (DANGEROUS)" msgstr "Ser compatible con el protocolo iptux's (PELIGROSO)" #: src/SendFileData.cpp:117 msgid "send" msgstr "enviar" #: src/SendFileData.cpp:162 #, c-format msgid "Failed to send the file \"%s\" to %s!" msgstr "Fallo al enviar el archivo \"%s\" a %s!" #: src/SendFileData.cpp:165 #, c-format msgid "Send the file \"%s\" to %s successfully!" msgstr "Envío correcto del archivo \"%s\" a %s !" #: src/SendFileData.cpp:290 #, c-format msgid "Failed to send the directory \"%s\" to %s!" msgstr "Fallo al enviar el directorio \"%s\" a %s!" #: src/SendFileData.cpp:293 #, c-format msgid "Send the directory \"%s\" to %s successfully!" msgstr "Envío correcto del directorio \"%s\" a %s !" #: src/ShareFile.cpp:102 msgid "Shared Files Management" msgstr "Administrador de Archivos Compartidos" #: src/ShareFile.cpp:105 msgid "OK" msgstr "Aceptar" #: src/ShareFile.cpp:106 msgid "Apply" msgstr "Aplicar" #: src/ShareFile.cpp:150 msgid "Add Files" msgstr "Añadir archivos" #: src/ShareFile.cpp:153 msgid "Add Folders" msgstr "Añadir directorios" #: src/ShareFile.cpp:156 msgid "Delete Resources" msgstr "Eliminar Recursos" #: src/ShareFile.cpp:159 msgid "Clear Password" msgstr "Limpiar Clave" #: src/ShareFile.cpp:162 msgid "Set Password" msgstr "Establecer clave" #: src/ShareFile.cpp:220 src/ShareFile.cpp:378 msgid "regular" msgstr "regular" #: src/ShareFile.cpp:224 src/ShareFile.cpp:382 msgid "directory" msgstr "directorio" #: src/ShareFile.cpp:270 msgid "File" msgstr "Archivo" #: src/ShareFile.cpp:286 msgid "Type" msgstr "Tipo" #: src/ShareFile.cpp:422 msgid "Choose the files to share" msgstr "Elegir los archivos para compartir" #: src/ShareFile.cpp:425 msgid "Choose the folders to share" msgstr "Elegir los directorios para compartir" #: src/SoundSystem.cpp:153 #, c-format msgid "Failed to play the prompt tone, %s\n" msgstr "Fallo la reproducción del archivo, %s\n" #: src/StatusIcon.cpp:102 src/StatusIcon.cpp:274 #, c-format msgid "To be read: %u messages" msgstr "Por leer: %u mensajes" #: src/StatusIcon.cpp:143 msgid "_Hide" msgstr "_Ocultar" #: src/StatusIcon.cpp:145 msgid "_Show" msgstr "_Mostrar" #: src/support.cpp:44 msgid "Loading the process successfully!" msgstr "Cargando el proceso correctamente!" #: src/support.cpp:63 msgid "The process is about to quit!" msgstr "¡El proceso está a punto de terminar!" #: src/support.cpp:102 #, c-format msgid "iptux: A software for sharing in LAN\n" msgstr "iptux: Un software para compartir en LAN\n" #: src/support.cpp:103 #, c-format msgid "" "\t-h --help\n" "\t\tdisplay this help and exit\n" msgstr "" "\t-h --help\n" "\t\tmuestra esta ayuda y sale\n" #: src/support.cpp:104 #, c-format msgid "" "\t-v --version\n" "\t\toutput version information and exit\n" msgstr "" "\t-v --version\n" "\t\tmuestra la información de la versión y sale\n" #: src/support.cpp:120 #, c-format msgid "What do you want to do?\n" msgstr "¿Qué quiere hacer?\n" #: src/support.cpp:149 msgid "Can't find any available web browser!\n" msgstr "No se puede encontrar ningún navegador web disponible!\n" #: src/support.cpp:179 #, c-format msgid "" "Fatal Error!!\n" "Failed to bind the TCP/UDP port(2425)!\n" "%s" msgstr "" "Error Fatal!!\n" "No se puede enlazar el puerto TCP/UDP (2425)!\n" "%s" #: src/UdpData.cpp:133 src/UdpData.cpp:134 src/UdpData.cpp:569 #: src/UdpData.cpp:606 msgid "mysterious" msgstr "misterioso" #: src/uninstall/utils.cpp:23 msgid "The user is not privileged!\n" msgstr "El usuario no tiene permisos!\n" #: src/uninstall/utils.cpp:34 #, c-format msgid "Opendir() directory \"%s\" failed, %s\n" msgstr "Opendir() directorio \"%s\" fallo, %s\n" #: src/uninstall/utils.cpp:45 #, c-format msgid "Stat() file \"%s\" failed, %s\n" msgstr "Stat() archivo \"%s\" fallo, %s\n" #: src/uninstall/utils.cpp:51 src/uninstall/utils.cpp:67 #, c-format msgid "Unlink() file \"%s\" failed, %s\n" msgstr "Unlink() archivo \"%s\" fallo, %s\n" #: src/uninstall/utils.cpp:61 #, c-format msgid "Rmdir() directory \"%s\" failed, %s\n" msgstr "Rmdir() directorio \"%s\" fallo, %s\n" #~ msgid "Pal's Shared Resources" #~ msgstr "Recursos Compartidos de amigos" #~ msgid "Files Receive Management" #~ msgstr "Administrador de Archivos Recibidos" #~ msgid "Recv" #~ msgstr "Recv" #~ msgid "Free:%s Total:%s" #~ msgstr "Libre:%s Total:%s" #~ msgid "Chat History" #~ msgstr "Historial de Charlas" #~ msgid "Choose enclosure files" #~ msgstr "Elegir archivos anexos" #~ msgid "Choose enclosure folders" #~ msgstr "Elegir directorios anexos" #~ msgid "" #~ "\n" #~ "Can't send an empty message!!" #~ msgstr "" #~ "\n" #~ "No puede enviar un mensaje vacío!!" #~ msgid "Me" #~ msgstr "Usted" iptux-0.6.3/po/iptux.pot000066400000000000000000000470061257720006400152160ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-02-06 19:16+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: src/AnalogFS.cpp:84 src/AnalogFS.cpp:89 #, c-format msgid "Open() file \"%s\" failed, %s" msgstr "" #: src/AnalogFS.cpp:109 #, c-format msgid "Stat64() file \"%s\" failed, %s" msgstr "" #: src/AnalogFS.cpp:130 #, c-format msgid "Mkdir() directory \"%s\" failed, %s" msgstr "" #: src/AnalogFS.cpp:145 #, c-format msgid "opendir on \"%s\" failed: %s" msgstr "" #: src/AnalogFS.cpp:191 #, c-format msgid "Opendir() directory \"%s\" failed, %s" msgstr "" #: src/Command.cpp:221 msgid "Your pal didn't receive the packet. He or she is offline maybe." msgstr "" #: src/CoreThread.cpp:231 src/DialogPeer.cpp:762 src/RecvFileData.cpp:152 #: src/RecvFileData.cpp:212 src/support.cpp:166 #, c-format msgid "" "Fatal Error!!\n" "Failed to create new socket!\n" "%s" msgstr "" #: src/CoreThread.cpp:556 src/CoreThread.cpp:581 src/CoreThread.cpp:1121 #: src/CoreThread.cpp:1147 msgid "Others" msgstr "" #: src/CoreThread.cpp:980 src/RecvFileData.cpp:133 src/RecvFileData.cpp:265 #: src/SendFileData.cpp:134 src/SendFileData.cpp:221 src/ShareFile.cpp:228 #: src/ShareFile.cpp:386 msgid "unknown" msgstr "" #: src/CoreThread.cpp:994 msgid "" msgstr "" #: src/CoreThread.cpp:1171 msgid "Broadcast" msgstr "" #: src/DataSettings.cpp:56 msgid "Personal" msgstr "" #: src/DataSettings.cpp:58 msgid "System" msgstr "" #: src/DataSettings.cpp:61 msgid "Sound" msgstr "" #: src/DataSettings.cpp:64 msgid "Network" msgstr "" #: src/DataSettings.cpp:148 msgid "Preferences" msgstr "" #: src/DataSettings.cpp:178 msgid "Your nickname:" msgstr "" #: src/DataSettings.cpp:184 msgid "Please input your nickname!" msgstr "" #: src/DataSettings.cpp:189 msgid "Your group name:" msgstr "" #: src/DataSettings.cpp:195 msgid "Please input your group name!" msgstr "" #: src/DataSettings.cpp:200 msgid "Your face picture:" msgstr "" #: src/DataSettings.cpp:213 msgid "Save files to: " msgstr "" #: src/DataSettings.cpp:223 msgid "Photo" msgstr "" #: src/DataSettings.cpp:235 msgid "Signature" msgstr "" #: src/DataSettings.cpp:266 msgid "Candidate network coding:" msgstr "" #: src/DataSettings.cpp:272 msgid "Candidate network coding" msgstr "" #: src/DataSettings.cpp:277 msgid "Preference network coding:" msgstr "" #: src/DataSettings.cpp:283 msgid "" "Preference network coding (You should be aware of what you are doing if you " "want to modify it.)" msgstr "" #: src/DataSettings.cpp:289 msgid "Pal's default face picture:" msgstr "" #: src/DataSettings.cpp:302 msgid "Panel font:" msgstr "" #: src/DataSettings.cpp:310 msgid "Automatically open the chat dialog" msgstr "" #: src/DataSettings.cpp:315 msgid "Automatically hide the panel after login" msgstr "" #: src/DataSettings.cpp:320 msgid "Automatically open the File Transmission Management" msgstr "" #: src/DataSettings.cpp:325 msgid "Use the 'Enter' key to send message" msgstr "" #: src/DataSettings.cpp:330 msgid "Automatically clean up the chat history" msgstr "" #: src/DataSettings.cpp:335 msgid "Save the chat history" msgstr "" #: src/DataSettings.cpp:340 msgid "Use the Blacklist (NOT recommended)" msgstr "" #: src/DataSettings.cpp:345 msgid "Filter the request of sharing files" msgstr "" #: src/DataSettings.cpp:367 msgid "Activate the sound support" msgstr "" #: src/DataSettings.cpp:374 msgid "Volume Control: " msgstr "" #: src/DataSettings.cpp:383 msgid "Sound Event" msgstr "" #: src/DataSettings.cpp:411 msgid "Test" msgstr "" #: src/DataSettings.cpp:414 msgid "Stop" msgstr "" #: src/DataSettings.cpp:437 msgid "From:" msgstr "" #: src/DataSettings.cpp:443 msgid "Beginning of the IP(v4) section" msgstr "" #: src/DataSettings.cpp:446 msgid "To:" msgstr "" #: src/DataSettings.cpp:452 msgid "End of the IP(v4) section" msgstr "" #: src/DataSettings.cpp:459 msgid "Add" msgstr "" #: src/DataSettings.cpp:463 msgid "Delete" msgstr "" #: src/DataSettings.cpp:469 msgid "Added IP(v4) Section:" msgstr "" #: src/DataSettings.cpp:488 msgid "Import" msgstr "" #: src/DataSettings.cpp:491 msgid "Export" msgstr "" #: src/DataSettings.cpp:494 msgid "Clear" msgstr "" #: src/DataSettings.cpp:709 msgid "Transfer finished" msgstr "" #: src/DataSettings.cpp:714 msgid "Message received" msgstr "" #: src/DataSettings.cpp:775 msgid "Play" msgstr "" #: src/DataSettings.cpp:782 msgid "Event" msgstr "" #: src/DataSettings.cpp:816 msgid "From" msgstr "" #: src/DataSettings.cpp:822 msgid "To" msgstr "" #: src/DataSettings.cpp:830 msgid "Description" msgstr "" #: src/DataSettings.cpp:847 msgid "Please select download folder" msgstr "" #: src/DataSettings.cpp:869 msgid "Select Font" msgstr "" #: src/DataSettings.cpp:882 msgid "Please select a sound file" msgstr "" #: src/DataSettings.cpp:1157 src/DataSettings.cpp:1189 #, c-format msgid "" "Fopen() file \"%s\" failed!\n" "%s" msgstr "" #: src/DataSettings.cpp:1238 src/DialogGroup.cpp:647 msgid "Select All" msgstr "" #: src/DataSettings.cpp:1243 src/DialogGroup.cpp:652 msgid "Reverse Select" msgstr "" #: src/DataSettings.cpp:1248 src/DialogGroup.cpp:657 msgid "Clear Up" msgstr "" #: src/DataSettings.cpp:1342 src/RevisePal.cpp:426 msgid "Please select a face picture" msgstr "" #: src/DataSettings.cpp:1365 msgid "Please select a personal photo" msgstr "" #: src/DataSettings.cpp:1509 src/DataSettings.cpp:1516 src/DetectPal.cpp:122 #, c-format msgid "" "\n" "Illegal IP(v4) address: %s!" msgstr "" #: src/DataSettings.cpp:1614 msgid "Please select a file to import data" msgstr "" #: src/DataSettings.cpp:1662 msgid "Save data to file" msgstr "" #: src/DetectPal.cpp:70 msgid "Detect pals" msgstr "" #: src/DetectPal.cpp:72 msgid "Detect" msgstr "" #: src/DetectPal.cpp:73 src/ShareFile.cpp:107 msgid "Cancel" msgstr "" #: src/DetectPal.cpp:91 msgid "Please input an IP address (IPv4 only):" msgstr "" #: src/DetectPal.cpp:99 msgid "Please input an IP address (IPv4 only)!" msgstr "" #: src/DetectPal.cpp:127 #, c-format msgid "The notification has been sent to %s." msgstr "" #: src/dialog.cpp:34 msgid "" "File transfer has not been completed.\n" "Are you sure to cancel and quit?" msgstr "" #: src/dialog.cpp:37 msgid "Confirm Exit" msgstr "" #: src/dialog.cpp:57 src/DialogPeer.cpp:379 src/MainWindow.cpp:1597 msgid "Request Shared Resources" msgstr "" #: src/dialog.cpp:60 msgid "Agree" msgstr "" #: src/dialog.cpp:61 src/DialogPeer.cpp:848 msgid "Refuse" msgstr "" #: src/dialog.cpp:74 #, c-format msgid "" "Your pal (%s)[%s]\n" "is requesting to get your shared resources,\n" "Do you agree?" msgstr "" #: src/dialog.cpp:103 msgid "Access Password" msgstr "" #: src/dialog.cpp:110 msgid "Please input the password for the shared files behind" msgstr "" #: src/dialog.cpp:123 #, c-format msgid "(%s)[%s]Password:" msgstr "" #: src/dialog.cpp:140 src/dialog.cpp:200 msgid "" "\n" "Empty Password!" msgstr "" #: src/dialog.cpp:163 msgid "Enter a New Password" msgstr "" #: src/dialog.cpp:173 msgid "Password: " msgstr "" #: src/dialog.cpp:181 msgid "Repeat: " msgstr "" #: src/dialog.cpp:195 msgid "" "\n" "Password Mismatched!" msgstr "" #: src/dialog.cpp:226 msgid "Please select a folder to save files." msgstr "" #: src/DialogGroup.cpp:277 #, c-format msgid "Talk with the group %s" msgstr "" #: src/DialogGroup.cpp:371 msgid "Member" msgstr "" #: src/DialogGroup.cpp:465 msgid "Send" msgstr "" #: src/DialogGroup.cpp:472 msgid "Pals" msgstr "" #: src/DialogGroup.cpp:495 src/DialogPeer.cpp:409 src/MainWindow.cpp:865 msgid "_Tools" msgstr "" #: src/DialogGroup.cpp:501 src/DialogPeer.cpp:417 msgid "Clear Buffer" msgstr "" #: src/DialogGroup.cpp:508 msgid "Sort" msgstr "" #: src/DialogGroup.cpp:514 src/MainWindow.cpp:904 msgid "By Nickname" msgstr "" #: src/DialogGroup.cpp:521 src/MainWindow.cpp:911 msgid "By IP" msgstr "" #: src/DialogGroup.cpp:531 src/MainWindow.cpp:921 msgid "Ascending" msgstr "" #: src/DialogGroup.cpp:538 src/MainWindow.cpp:928 msgid "Descending" msgstr "" #: src/DialogPeer.cpp:231 #, c-format msgid "Talk with %s(%s) IP:%s" msgstr "" #: src/DialogPeer.cpp:329 msgid "Info." msgstr "" #: src/DialogPeer.cpp:363 src/MainWindow.cpp:819 msgid "_File" msgstr "" #: src/DialogPeer.cpp:367 msgid "Attach File" msgstr "" #: src/DialogPeer.cpp:373 msgid "Attach Folder" msgstr "" #: src/DialogPeer.cpp:389 msgid "Close" msgstr "" #: src/DialogPeer.cpp:413 msgid "Insert Picture" msgstr "" #: src/DialogPeer.cpp:438 src/MainWindow.cpp:1653 #, c-format msgid "Version: %s\n" msgstr "" #: src/DialogPeer.cpp:442 src/MainWindow.cpp:1657 #, c-format msgid "Nickname: %s@%s\n" msgstr "" #: src/DialogPeer.cpp:444 src/MainWindow.cpp:1659 #, c-format msgid "Nickname: %s\n" msgstr "" #: src/DialogPeer.cpp:447 src/MainWindow.cpp:1662 #, c-format msgid "User: %s\n" msgstr "" #: src/DialogPeer.cpp:450 src/MainWindow.cpp:1665 #, c-format msgid "Host: %s\n" msgstr "" #: src/DialogPeer.cpp:455 src/MainWindow.cpp:1670 #, c-format msgid "Address: %s(%s)\n" msgstr "" #: src/DialogPeer.cpp:457 src/MainWindow.cpp:1672 #, c-format msgid "Address: %s\n" msgstr "" #: src/DialogPeer.cpp:461 src/MainWindow.cpp:1676 #, c-format msgid "Compatibility: Microsoft\n" msgstr "" #: src/DialogPeer.cpp:463 src/MainWindow.cpp:1678 #, c-format msgid "Compatibility: GNU/Linux\n" msgstr "" #: src/DialogPeer.cpp:466 src/MainWindow.cpp:1681 #, c-format msgid "System coding: %s\n" msgstr "" #: src/DialogPeer.cpp:470 src/MainWindow.cpp:1685 msgid "Signature:\n" msgstr "" #: src/DialogPeer.cpp:477 msgid "" "\n" "Photo:\n" msgstr "" #: src/DialogPeer.cpp:722 msgid "Please select a picture to insert the buffer" msgstr "" #: src/DialogPeer.cpp:789 msgid "Enclosure." msgstr "" #: src/DialogPeer.cpp:836 msgid "File to be receive." msgstr "" #: src/DialogPeer.cpp:840 msgid "Receiving progress." msgstr "" #: src/DialogPeer.cpp:843 msgid "Accept" msgstr "" #: src/DialogPeer.cpp:853 msgid "Detial" msgstr "" #: src/DialogPeer.cpp:884 msgid "File received." msgstr "" #: src/DialogPeer.cpp:926 src/DialogPeer.cpp:990 msgid "Source" msgstr "" #: src/DialogPeer.cpp:932 msgid "SaveAs" msgstr "" #: src/DialogPeer.cpp:937 src/DialogPeer.cpp:1000 src/MainWindow.cpp:1213 #: src/ShareFile.cpp:280 msgid "Size" msgstr "" #: src/DialogPeer.cpp:995 msgid "Name" msgstr "" #: src/DialogPeer.cpp:1096 src/DialogPeer.cpp:1169 #, c-format msgid "Receiving Progress." msgstr "" #: src/DialogPeer.cpp:1099 src/DialogPeer.cpp:1172 #, c-format msgid "%s to Receive." msgstr "" #: src/DialogPeer.cpp:1103 src/DialogPeer.cpp:1176 #, c-format msgid "%s Of %s Received." msgstr "" #: src/DialogPeer.cpp:1109 #, c-format msgid "Mission Completed!" msgstr "" #: src/DialogPeer.cpp:1321 msgid "Remove Selected" msgstr "" #: src/HelpDialog.cpp:61 src/HelpDialog.cpp:66 msgid "Jally " msgstr "" #: src/HelpDialog.cpp:62 src/HelpDialog.cpp:68 msgid "ManPT " msgstr "" #: src/HelpDialog.cpp:67 msgid "LiWeijian " msgstr "" #: src/HelpDialog.cpp:71 msgid "" "alick \n" "ManPT " msgstr "" #: src/HelpDialog.cpp:80 src/MainWindow.cpp:576 src/StatusIcon.cpp:106 #: src/StatusIcon.cpp:277 msgid "iptux" msgstr "" #: src/HelpDialog.cpp:85 msgid "A GTK+ based LAN Messenger." msgstr "" #: src/HelpDialog.cpp:102 msgid "Help" msgstr "" #: src/HelpDialog.cpp:102 msgid "Contributers" msgstr "" #: src/HelpDialog.cpp:102 src/HelpDialog.cpp:120 msgid "..." msgstr "" #: src/HelpDialog.cpp:104 msgid "" "Project Home: \n" "https://github.com/iptux-src/iptux\n" "\n" "User and Developer Group: \n" "https://groups.google.com/group/iptux/\n" "\n" "Note that you can get help form the project wiki page.\n" "\n" "If you find no solutions in any of the existed documents, feel free to drop " "a email at iptux@googlegroups.com, lots of users and developers would be " "glade to help about your problems." msgstr "" #: src/HelpDialog.cpp:110 msgid "" "It's an honor that iptux was contributed voluntarilly by many people. " "Without your help, iptux could never make it.\n" "\n" "Especially, Here's some we would like to thank much:\n" "\n" "ChenGang\n" "\n" "\n" "\n" "\n" "\n" "..." msgstr "" #: src/HelpDialog.cpp:128 msgid "More About Iptux" msgstr "" #: src/LogSystem.cpp:53 #, c-format msgid "Recevied-From: Nickname:%s User:%s Host:%s" msgstr "" #: src/LogSystem.cpp:57 #, c-format msgid "Send-To: Nickname:%s User:%s Host:%s" msgstr "" #: src/LogSystem.cpp:60 msgid "Send-Broadcast" msgstr "" #: src/LogSystem.cpp:83 #, c-format msgid "User:%s Host:%s" msgstr "" #: src/MainWindow.cpp:603 msgid "Files Transmission Management" msgstr "" #: src/MainWindow.cpp:718 msgid "Pals Online: 0" msgstr "" #: src/MainWindow.cpp:801 msgid "Search Pals" msgstr "" #: src/MainWindow.cpp:824 src/StatusIcon.cpp:185 msgid "_Detect" msgstr "" #: src/MainWindow.cpp:833 msgid "_Find" msgstr "" #: src/MainWindow.cpp:845 src/StatusIcon.cpp:194 msgid "_Quit" msgstr "" #: src/MainWindow.cpp:871 src/StatusIcon.cpp:164 msgid "_Preferences" msgstr "" #: src/MainWindow.cpp:880 src/StatusIcon.cpp:156 msgid "_Transmission" msgstr "" #: src/MainWindow.cpp:889 src/StatusIcon.cpp:173 msgid "_Shared Management" msgstr "" #: src/MainWindow.cpp:898 msgid "_Sort" msgstr "" #: src/MainWindow.cpp:936 msgid "_Update" msgstr "" #: src/MainWindow.cpp:953 msgid "http://code.google.com/p/iptux/wiki/FAQ?wl=en" msgstr "" #: src/MainWindow.cpp:957 msgid "_Help" msgstr "" #: src/MainWindow.cpp:965 msgid "_More" msgstr "" #: src/MainWindow.cpp:969 msgid "_FAQ" msgstr "" #: src/MainWindow.cpp:1121 msgid "Nickname" msgstr "" #: src/MainWindow.cpp:1132 msgid "Group" msgstr "" #: src/MainWindow.cpp:1138 src/MainWindow.cpp:1201 msgid "IPv4" msgstr "" #: src/MainWindow.cpp:1144 msgid "User" msgstr "" #: src/MainWindow.cpp:1150 msgid "Host" msgstr "" #: src/MainWindow.cpp:1183 msgid "State" msgstr "" #: src/MainWindow.cpp:1189 msgid "Task" msgstr "" #: src/MainWindow.cpp:1195 msgid "Peer" msgstr "" #: src/MainWindow.cpp:1207 msgid "Filename" msgstr "" #: src/MainWindow.cpp:1219 msgid "Completed" msgstr "" #: src/MainWindow.cpp:1225 msgid "Progress" msgstr "" #: src/MainWindow.cpp:1231 msgid "Cost" msgstr "" #: src/MainWindow.cpp:1237 msgid "Remaining" msgstr "" #: src/MainWindow.cpp:1243 msgid "Rate" msgstr "" #: src/MainWindow.cpp:1534 msgid "Open This File" msgstr "" #: src/MainWindow.cpp:1540 msgid "Open Containing Folder" msgstr "" #: src/MainWindow.cpp:1546 msgid "Terminate Task" msgstr "" #: src/MainWindow.cpp:1551 msgid "Terminate All" msgstr "" #: src/MainWindow.cpp:1556 msgid "Clear Tasklist" msgstr "" #: src/MainWindow.cpp:1577 msgid "Send Message" msgstr "" #: src/MainWindow.cpp:1611 msgid "Change Info." msgstr "" #: src/MainWindow.cpp:1626 msgid "Delete Pal" msgstr "" #: src/MainWindow.cpp:1715 #, c-format msgid "Pals Online: %" msgstr "" #: src/MainWindow.cpp:1946 msgid "The file you want to open not exist!" msgstr "" #: src/MainWindow.cpp:1975 msgid "The path you want to open not exist!" msgstr "" #: src/output.cpp:35 msgid "Infomation" msgstr "" #: src/output.cpp:60 msgid "Warning" msgstr "" #: src/output.cpp:83 msgid "Error" msgstr "" #: src/ProgramData.cpp:216 msgid "utf-16" msgstr "" #: src/ProgramData.cpp:219 msgid "utf-8" msgstr "" #: src/RecvFileData.cpp:117 msgid "receive" msgstr "" #: src/RecvFileData.cpp:184 #, c-format msgid "Failed to receive the file \"%s\" from %s!" msgstr "" #: src/RecvFileData.cpp:187 #, c-format msgid "Receive the file \"%s\" from %s successfully!" msgstr "" #: src/RecvFileData.cpp:332 #, c-format msgid "Failed to receive the directory \"%s\" from %s!" msgstr "" #: src/RecvFileData.cpp:335 #, c-format msgid "Receive the directory \"%s\" from %s successfully!" msgstr "" #: src/RevisePal.cpp:97 msgid "Change Pal's Information" msgstr "" #: src/RevisePal.cpp:125 msgid "Pal's nickname:" msgstr "" #: src/RevisePal.cpp:131 msgid "Please input pal's new nickname!" msgstr "" #: src/RevisePal.cpp:137 msgid "Pal's group name:" msgstr "" #: src/RevisePal.cpp:143 msgid "Please input pal's new group name!" msgstr "" #: src/RevisePal.cpp:149 msgid "System coding:" msgstr "" #: src/RevisePal.cpp:155 msgid "Be SURE to know what you are doing!" msgstr "" #: src/RevisePal.cpp:161 msgid "Pal's face picture:" msgstr "" #: src/RevisePal.cpp:175 msgid "Be compatible with iptux's protocol (DANGEROUS)" msgstr "" #: src/SendFileData.cpp:117 msgid "send" msgstr "" #: src/SendFileData.cpp:162 #, c-format msgid "Failed to send the file \"%s\" to %s!" msgstr "" #: src/SendFileData.cpp:165 #, c-format msgid "Send the file \"%s\" to %s successfully!" msgstr "" #: src/SendFileData.cpp:290 #, c-format msgid "Failed to send the directory \"%s\" to %s!" msgstr "" #: src/SendFileData.cpp:293 #, c-format msgid "Send the directory \"%s\" to %s successfully!" msgstr "" #: src/ShareFile.cpp:102 msgid "Shared Files Management" msgstr "" #: src/ShareFile.cpp:105 msgid "OK" msgstr "" #: src/ShareFile.cpp:106 msgid "Apply" msgstr "" #: src/ShareFile.cpp:150 msgid "Add Files" msgstr "" #: src/ShareFile.cpp:153 msgid "Add Folders" msgstr "" #: src/ShareFile.cpp:156 msgid "Delete Resources" msgstr "" #: src/ShareFile.cpp:159 msgid "Clear Password" msgstr "" #: src/ShareFile.cpp:162 msgid "Set Password" msgstr "" #: src/ShareFile.cpp:220 src/ShareFile.cpp:378 msgid "regular" msgstr "" #: src/ShareFile.cpp:224 src/ShareFile.cpp:382 msgid "directory" msgstr "" #: src/ShareFile.cpp:270 msgid "File" msgstr "" #: src/ShareFile.cpp:286 msgid "Type" msgstr "" #: src/ShareFile.cpp:422 msgid "Choose the files to share" msgstr "" #: src/ShareFile.cpp:425 msgid "Choose the folders to share" msgstr "" #: src/SoundSystem.cpp:153 #, c-format msgid "Failed to play the prompt tone, %s\n" msgstr "" #: src/StatusIcon.cpp:102 src/StatusIcon.cpp:274 #, c-format msgid "To be read: %u messages" msgstr "" #: src/StatusIcon.cpp:143 msgid "_Hide" msgstr "" #: src/StatusIcon.cpp:145 msgid "_Show" msgstr "" #: src/support.cpp:44 msgid "Loading the process successfully!" msgstr "" #: src/support.cpp:63 msgid "The process is about to quit!" msgstr "" #: src/support.cpp:102 #, c-format msgid "iptux: A software for sharing in LAN\n" msgstr "" #: src/support.cpp:103 #, c-format msgid "" "\t-h --help\n" "\t\tdisplay this help and exit\n" msgstr "" #: src/support.cpp:104 #, c-format msgid "" "\t-v --version\n" "\t\toutput version information and exit\n" msgstr "" #: src/support.cpp:120 #, c-format msgid "What do you want to do?\n" msgstr "" #: src/support.cpp:149 msgid "Can't find any available web browser!\n" msgstr "" #: src/support.cpp:179 #, c-format msgid "" "Fatal Error!!\n" "Failed to bind the TCP/UDP port(2425)!\n" "%s" msgstr "" #: src/UdpData.cpp:133 src/UdpData.cpp:134 src/UdpData.cpp:569 #: src/UdpData.cpp:606 msgid "mysterious" msgstr "" #: src/uninstall/utils.cpp:23 msgid "The user is not privileged!\n" msgstr "" #: src/uninstall/utils.cpp:34 #, c-format msgid "Opendir() directory \"%s\" failed, %s\n" msgstr "" #: src/uninstall/utils.cpp:45 #, c-format msgid "Stat() file \"%s\" failed, %s\n" msgstr "" #: src/uninstall/utils.cpp:51 src/uninstall/utils.cpp:67 #, c-format msgid "Unlink() file \"%s\" failed, %s\n" msgstr "" #: src/uninstall/utils.cpp:61 #, c-format msgid "Rmdir() directory \"%s\" failed, %s\n" msgstr "" iptux-0.6.3/po/pl.po000066400000000000000000000627701257720006400143010ustar00rootroot00000000000000# Polish translation for iptux # Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010 # This file is distributed under the same license as the iptux package. # FIRST AUTHOR , 2010. # msgid "" msgstr "" "Project-Id-Version: iptux\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-02-06 19:16+0800\n" "PO-Revision-Date: 2010-07-29 13:29+0000\n" "Last-Translator: Twojwujaszek \n" "Language-Team: Polish \n" "Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2010-07-29 14:36+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: src/AnalogFS.cpp:84 src/AnalogFS.cpp:89 #, c-format msgid "Open() file \"%s\" failed, %s" msgstr "Open() plik \"%s\" błąd, %s" #: src/AnalogFS.cpp:109 #, c-format msgid "Stat64() file \"%s\" failed, %s" msgstr "Stat64() plik \"%s\" błąd, %s" #: src/AnalogFS.cpp:130 #, c-format msgid "Mkdir() directory \"%s\" failed, %s" msgstr "Mkdir() katalog \"%s\" błąd, %s" #: src/AnalogFS.cpp:145 #, fuzzy, c-format msgid "opendir on \"%s\" failed: %s" msgstr "Opendir() katalog \"%s\" błąd, %s" #: src/AnalogFS.cpp:191 #, c-format msgid "Opendir() directory \"%s\" failed, %s" msgstr "Opendir() katalog \"%s\" błąd, %s" #: src/Command.cpp:221 msgid "Your pal didn't receive the packet. He or she is offline maybe." msgstr "Twój znajomy nie otrzymał pakietu. Być może jest niedostępny." #: src/CoreThread.cpp:231 src/DialogPeer.cpp:762 src/RecvFileData.cpp:152 #: src/RecvFileData.cpp:212 src/support.cpp:166 #, c-format msgid "" "Fatal Error!!\n" "Failed to create new socket!\n" "%s" msgstr "" "Błąd Krytyczny!!\n" "Nie można utworzyć nowego gniazda sieciowego!\n" "%s" #: src/CoreThread.cpp:556 src/CoreThread.cpp:581 src/CoreThread.cpp:1121 #: src/CoreThread.cpp:1147 msgid "Others" msgstr "Inne" #: src/CoreThread.cpp:980 src/RecvFileData.cpp:133 src/RecvFileData.cpp:265 #: src/SendFileData.cpp:134 src/SendFileData.cpp:221 src/ShareFile.cpp:228 #: src/ShareFile.cpp:386 msgid "unknown" msgstr "nieznany" #: src/CoreThread.cpp:994 msgid "" msgstr "" #: src/CoreThread.cpp:1171 msgid "Broadcast" msgstr "Adres rozgłoszeniowy" #: src/DataSettings.cpp:56 msgid "Personal" msgstr "Osobiste" #: src/DataSettings.cpp:58 msgid "System" msgstr "System" #: src/DataSettings.cpp:61 msgid "Sound" msgstr "Dźwięk" #: src/DataSettings.cpp:64 msgid "Network" msgstr "Sieć" #: src/DataSettings.cpp:148 msgid "Preferences" msgstr "Preferencje" #: src/DataSettings.cpp:178 msgid "Your nickname:" msgstr "Twój nick:" #: src/DataSettings.cpp:184 msgid "Please input your nickname!" msgstr "Proszę wpisać swój nick" #: src/DataSettings.cpp:189 msgid "Your group name:" msgstr "Twoja nazwa grupy" #: src/DataSettings.cpp:195 msgid "Please input your group name!" msgstr "Proszę wpisać swoją nazwę grupy!" #: src/DataSettings.cpp:200 msgid "Your face picture:" msgstr "Twój avatar:" #: src/DataSettings.cpp:213 msgid "Save files to: " msgstr "Zapisz pliki do: " #: src/DataSettings.cpp:223 msgid "Photo" msgstr "Zdjęcie" #: src/DataSettings.cpp:235 msgid "Signature" msgstr "Sygnatura" #: src/DataSettings.cpp:266 msgid "Candidate network coding:" msgstr "Kandydat kodowania sieci:" #: src/DataSettings.cpp:272 msgid "Candidate network coding" msgstr "Kandydat kodowania sieci" #: src/DataSettings.cpp:277 msgid "Preference network coding:" msgstr "Ustawienia kodowania sieci:" #: src/DataSettings.cpp:283 msgid "" "Preference network coding (You should be aware of what you are doing if you " "want to modify it.)" msgstr "" "Kandydat kodowania sieci (Zmień tylko gdy jesteś świadomy tego co robisz.)" #: src/DataSettings.cpp:289 msgid "Pal's default face picture:" msgstr "Domyślny avatar kontaktów:" #: src/DataSettings.cpp:302 msgid "Panel font:" msgstr "Czcionka panelu:" #: src/DataSettings.cpp:310 msgid "Automatically open the chat dialog" msgstr "Automatyczne otwieranie okna rozmowy" #: src/DataSettings.cpp:315 msgid "Automatically hide the panel after login" msgstr "Automatycznie ukryj panel po zalogowaniu" #: src/DataSettings.cpp:320 msgid "Automatically open the File Transmission Management" msgstr "Automatycznie otwórz Narzędzie Transmisji Plików" #: src/DataSettings.cpp:325 msgid "Use the 'Enter' key to send message" msgstr "Używaj 'Enter' by wysłać wiadomość" #: src/DataSettings.cpp:330 msgid "Automatically clean up the chat history" msgstr "Automatycznie czyść historię rozmowy" #: src/DataSettings.cpp:335 msgid "Save the chat history" msgstr "Zapisz historię rozmowy" #: src/DataSettings.cpp:340 msgid "Use the Blacklist (NOT recommended)" msgstr "Używaj Blacklisty ( NIE zalecane)" #: src/DataSettings.cpp:345 msgid "Filter the request of sharing files" msgstr "Filtruj żądanie współdzielenia plików" #: src/DataSettings.cpp:367 msgid "Activate the sound support" msgstr "Aktywuj dźwięk" #: src/DataSettings.cpp:374 msgid "Volume Control: " msgstr "Poziom głośności: " #: src/DataSettings.cpp:383 msgid "Sound Event" msgstr "Zdarzenia dźwiękowe" #: src/DataSettings.cpp:411 msgid "Test" msgstr "Test" #: src/DataSettings.cpp:414 msgid "Stop" msgstr "Stop" #: src/DataSettings.cpp:437 msgid "From:" msgstr "Od:" #: src/DataSettings.cpp:443 msgid "Beginning of the IP(v4) section" msgstr "Początek sekcji IP(v4)" #: src/DataSettings.cpp:446 msgid "To:" msgstr "Do:" #: src/DataSettings.cpp:452 msgid "End of the IP(v4) section" msgstr "Koniec sekcji IP(v4)" #: src/DataSettings.cpp:459 msgid "Add" msgstr "Dodaj" #: src/DataSettings.cpp:463 msgid "Delete" msgstr "Usuń" #: src/DataSettings.cpp:469 msgid "Added IP(v4) Section:" msgstr "Dodaj sekcję IP(v4)" #: src/DataSettings.cpp:488 msgid "Import" msgstr "Import" #: src/DataSettings.cpp:491 msgid "Export" msgstr "Eksport" #: src/DataSettings.cpp:494 msgid "Clear" msgstr "Wyczyść" #: src/DataSettings.cpp:709 msgid "Transfer finished" msgstr "Transfer zakończony" #: src/DataSettings.cpp:714 msgid "Message received" msgstr "Odebrano wiadomość" #: src/DataSettings.cpp:775 msgid "Play" msgstr "Odtwórz" #: src/DataSettings.cpp:782 msgid "Event" msgstr "Zdarzenie" #: src/DataSettings.cpp:816 msgid "From" msgstr "Od" #: src/DataSettings.cpp:822 msgid "To" msgstr "Do" #: src/DataSettings.cpp:830 msgid "Description" msgstr "Opis" #: src/DataSettings.cpp:847 msgid "Please select download folder" msgstr "Wybierz folder pobierania" #: src/DataSettings.cpp:869 msgid "Select Font" msgstr "Wybierz czcionkę" #: src/DataSettings.cpp:882 msgid "Please select a sound file" msgstr "Wybierz plik dźwiękowy" #: src/DataSettings.cpp:1157 src/DataSettings.cpp:1189 #, c-format msgid "" "Fopen() file \"%s\" failed!\n" "%s" msgstr "" "Fopen() plik \"%s\" błąd!\n" "%s" #: src/DataSettings.cpp:1238 src/DialogGroup.cpp:647 msgid "Select All" msgstr "Zaznacz wszystko" #: src/DataSettings.cpp:1243 src/DialogGroup.cpp:652 msgid "Reverse Select" msgstr "Wybór zwrotu" #: src/DataSettings.cpp:1248 src/DialogGroup.cpp:657 msgid "Clear Up" msgstr "Wyczyść" #: src/DataSettings.cpp:1342 src/RevisePal.cpp:426 msgid "Please select a face picture" msgstr "Wybierz avatar" #: src/DataSettings.cpp:1365 msgid "Please select a personal photo" msgstr "Wybierz osobiste zdjęcie" #: src/DataSettings.cpp:1509 src/DataSettings.cpp:1516 src/DetectPal.cpp:122 #, c-format msgid "" "\n" "Illegal IP(v4) address: %s!" msgstr "" "\n" "Nieprawidłowy adres IP(v4): %s!" #: src/DataSettings.cpp:1614 msgid "Please select a file to import data" msgstr "Wybierz plik do zaimportowania danych" #: src/DataSettings.cpp:1662 msgid "Save data to file" msgstr "Zapisz dane do pliku" #: src/DetectPal.cpp:70 msgid "Detect pals" msgstr "Szukaj znajomych" #: src/DetectPal.cpp:72 msgid "Detect" msgstr "Wykrywanie" #: src/DetectPal.cpp:73 src/ShareFile.cpp:107 msgid "Cancel" msgstr "Anuluj" #: src/DetectPal.cpp:91 msgid "Please input an IP address (IPv4 only):" msgstr "Wpisz adres IP (Tylko IPv4):" #: src/DetectPal.cpp:99 msgid "Please input an IP address (IPv4 only)!" msgstr "Wpisz adres IP (Tylko IPv4)!" #: src/DetectPal.cpp:127 #, c-format msgid "The notification has been sent to %s." msgstr "Zgłoszenie zostało wysłane do %s." #: src/dialog.cpp:34 msgid "" "File transfer has not been completed.\n" "Are you sure to cancel and quit?" msgstr "" "Przesyłanie plików nie zostało zakończone.\n" "Czy na pewno anulować, i wyjść?" #: src/dialog.cpp:37 msgid "Confirm Exit" msgstr "Potwierdz zamknięcie" #: src/dialog.cpp:57 src/DialogPeer.cpp:379 src/MainWindow.cpp:1597 msgid "Request Shared Resources" msgstr "Zapytanie o Udostępnione Zasoby" #: src/dialog.cpp:60 msgid "Agree" msgstr "Akceptuj" #: src/dialog.cpp:61 src/DialogPeer.cpp:848 msgid "Refuse" msgstr "Odrzuć" #: src/dialog.cpp:74 #, c-format msgid "" "Your pal (%s)[%s]\n" "is requesting to get your shared resources,\n" "Do you agree?" msgstr "" "Twój znajomy (%s)[%s]\n" ",pyta o Twoje Udostępnione Zasoby\n" "Zgadzasz się?" #: src/dialog.cpp:103 msgid "Access Password" msgstr "Hasło dostępu" #: src/dialog.cpp:110 msgid "Please input the password for the shared files behind" msgstr "Proszę wpisać hasło dla udostępnionych plików" #: src/dialog.cpp:123 #, c-format msgid "(%s)[%s]Password:" msgstr "(%s)[%s]Hasło:" #: src/dialog.cpp:140 src/dialog.cpp:200 msgid "" "\n" "Empty Password!" msgstr "" "\n" "Puste Hasło!" #: src/dialog.cpp:163 msgid "Enter a New Password" msgstr "Wpisz Nowe Hasło" #: src/dialog.cpp:173 msgid "Password: " msgstr "Hasło: " #: src/dialog.cpp:181 msgid "Repeat: " msgstr "Powtórz: " #: src/dialog.cpp:195 msgid "" "\n" "Password Mismatched!" msgstr "" "\n" "Niezgodne Hasło!" #: src/dialog.cpp:226 #, fuzzy msgid "Please select a folder to save files." msgstr "Wybierz plik dźwiękowy" #: src/DialogGroup.cpp:277 #, c-format msgid "Talk with the group %s" msgstr "Rozmawiaj z grupą %s" #: src/DialogGroup.cpp:371 msgid "Member" msgstr "Członek" #: src/DialogGroup.cpp:465 msgid "Send" msgstr "Wyślij" #: src/DialogGroup.cpp:472 msgid "Pals" msgstr "Znajomi" #: src/DialogGroup.cpp:495 src/DialogPeer.cpp:409 src/MainWindow.cpp:865 msgid "_Tools" msgstr "_Narzędzia" #: src/DialogGroup.cpp:501 src/DialogPeer.cpp:417 msgid "Clear Buffer" msgstr "Czyść Bufor" #: src/DialogGroup.cpp:508 msgid "Sort" msgstr "Sortuj" #: src/DialogGroup.cpp:514 src/MainWindow.cpp:904 msgid "By Nickname" msgstr "Wg Nazwy" #: src/DialogGroup.cpp:521 src/MainWindow.cpp:911 msgid "By IP" msgstr "Wg IP" #: src/DialogGroup.cpp:531 src/MainWindow.cpp:921 msgid "Ascending" msgstr "Rosnąco" #: src/DialogGroup.cpp:538 src/MainWindow.cpp:928 msgid "Descending" msgstr "Malejąco" #: src/DialogPeer.cpp:231 #, fuzzy, c-format msgid "Talk with %s(%s) IP:%s" msgstr "Rozmawiaj z %s" #: src/DialogPeer.cpp:329 msgid "Info." msgstr "Info." #: src/DialogPeer.cpp:363 src/MainWindow.cpp:819 msgid "_File" msgstr "_Plik" #: src/DialogPeer.cpp:367 msgid "Attach File" msgstr "Dołącz Plik" #: src/DialogPeer.cpp:373 msgid "Attach Folder" msgstr "Dołącz Folder" #: src/DialogPeer.cpp:389 msgid "Close" msgstr "Zamknij" #: src/DialogPeer.cpp:413 msgid "Insert Picture" msgstr "Wstaw obrazek" #: src/DialogPeer.cpp:438 src/MainWindow.cpp:1653 #, c-format msgid "Version: %s\n" msgstr "Wersja: %s\n" #: src/DialogPeer.cpp:442 src/MainWindow.cpp:1657 #, c-format msgid "Nickname: %s@%s\n" msgstr "Nick: %s@%s\n" #: src/DialogPeer.cpp:444 src/MainWindow.cpp:1659 #, c-format msgid "Nickname: %s\n" msgstr "Nick: %s\n" #: src/DialogPeer.cpp:447 src/MainWindow.cpp:1662 #, c-format msgid "User: %s\n" msgstr "Użytkownik: %s\n" #: src/DialogPeer.cpp:450 src/MainWindow.cpp:1665 #, c-format msgid "Host: %s\n" msgstr "Host: %s\n" #: src/DialogPeer.cpp:455 src/MainWindow.cpp:1670 #, c-format msgid "Address: %s(%s)\n" msgstr "Addres: %s(%s)\n" #: src/DialogPeer.cpp:457 src/MainWindow.cpp:1672 #, c-format msgid "Address: %s\n" msgstr "Addres: %s\n" #: src/DialogPeer.cpp:461 src/MainWindow.cpp:1676 #, c-format msgid "Compatibility: Microsoft\n" msgstr "Kompatybilność: Microsoft\n" #: src/DialogPeer.cpp:463 src/MainWindow.cpp:1678 #, c-format msgid "Compatibility: GNU/Linux\n" msgstr "Kompatybilność: GNU/Linux\n" #: src/DialogPeer.cpp:466 src/MainWindow.cpp:1681 #, c-format msgid "System coding: %s\n" msgstr "Kodowanie Systemu: %s\n" #: src/DialogPeer.cpp:470 src/MainWindow.cpp:1685 msgid "Signature:\n" msgstr "Sygnatura:\n" #: src/DialogPeer.cpp:477 msgid "" "\n" "Photo:\n" msgstr "" "\n" "Zdjęcie:\n" #: src/DialogPeer.cpp:722 msgid "Please select a picture to insert the buffer" msgstr "Wybierz zdjęcie, aby wstawić do bufora" #: src/DialogPeer.cpp:789 msgid "Enclosure." msgstr "" #: src/DialogPeer.cpp:836 msgid "File to be receive." msgstr "" #: src/DialogPeer.cpp:840 msgid "Receiving progress." msgstr "" #: src/DialogPeer.cpp:843 msgid "Accept" msgstr "Akceptuj" #: src/DialogPeer.cpp:853 msgid "Detial" msgstr "" #: src/DialogPeer.cpp:884 #, fuzzy msgid "File received." msgstr "Odebrano wiadomość" #: src/DialogPeer.cpp:926 src/DialogPeer.cpp:990 msgid "Source" msgstr "Źródło" #: src/DialogPeer.cpp:932 msgid "SaveAs" msgstr "" #: src/DialogPeer.cpp:937 src/DialogPeer.cpp:1000 src/MainWindow.cpp:1213 #: src/ShareFile.cpp:280 msgid "Size" msgstr "Rozmiar" #: src/DialogPeer.cpp:995 msgid "Name" msgstr "" #: src/DialogPeer.cpp:1096 src/DialogPeer.cpp:1169 #, c-format msgid "Receiving Progress." msgstr "" #: src/DialogPeer.cpp:1099 src/DialogPeer.cpp:1172 #, c-format msgid "%s to Receive." msgstr "" #: src/DialogPeer.cpp:1103 src/DialogPeer.cpp:1176 #, c-format msgid "%s Of %s Received." msgstr "" #: src/DialogPeer.cpp:1109 #, fuzzy, c-format msgid "Mission Completed!" msgstr "Zakończone" #: src/DialogPeer.cpp:1321 #, fuzzy msgid "Remove Selected" msgstr "Wybór zwrotu" #: src/HelpDialog.cpp:61 src/HelpDialog.cpp:66 msgid "Jally " msgstr "Jally " #: src/HelpDialog.cpp:62 src/HelpDialog.cpp:68 msgid "ManPT " msgstr "ManPT " #: src/HelpDialog.cpp:67 msgid "LiWeijian " msgstr "LiWeijian " #: src/HelpDialog.cpp:71 msgid "" "alick \n" "ManPT " msgstr "Tybek " #: src/HelpDialog.cpp:80 src/MainWindow.cpp:576 src/StatusIcon.cpp:106 #: src/StatusIcon.cpp:277 msgid "iptux" msgstr "iptux" #: src/HelpDialog.cpp:85 msgid "A GTK+ based LAN Messenger." msgstr "Komunikator LAN oparty na bibliotece GTK+" #: src/HelpDialog.cpp:102 msgid "Help" msgstr "Pomoc" #: src/HelpDialog.cpp:102 msgid "Contributers" msgstr "Uczestnicy" #: src/HelpDialog.cpp:102 src/HelpDialog.cpp:120 msgid "..." msgstr "..." #: src/HelpDialog.cpp:104 #, fuzzy msgid "" "Project Home: \n" "https://github.com/iptux-src/iptux\n" "\n" "User and Developer Group: \n" "https://groups.google.com/group/iptux/\n" "\n" "Note that you can get help form the project wiki page.\n" "\n" "If you find no solutions in any of the existed documents, feel free to drop " "a email at iptux@googlegroups.com, lots of users and developers would be " "glade to help about your problems." msgstr "" "Strona Domowa Projektu: \n" "http://code.google.com/p/iptux/\n" "\n" "Grupa użytkowników i programistów: \n" "https://groups.google.com/group/iptux/\n" "\n" "Pamiętaj, że możesz uzyskać pomoc w ramach projektu wiki.\n" "\n" "Jeśli nie znajdziesz rozwiązania w żadnym z istniejących dokumentów, prosimy " "o e-mail na adres iptux@googlegroups.com, wielu użytkowników i deweloperów " "otrzymuje tam pomoc w swoich problemach." #: src/HelpDialog.cpp:110 msgid "" "It's an honor that iptux was contributed voluntarilly by many people. " "Without your help, iptux could never make it.\n" "\n" "Especially, Here's some we would like to thank much:\n" "\n" "ChenGang\n" "\n" "\n" "\n" "\n" "\n" "..." msgstr "" "To zaszczyt, że iptux został wspóltworzony przez wiele osób. Bez Twojej " "pomocy, iptux nigdy by nie powstał.\n" "\n" "Oto kilka osób, którym chcielibyśmy szczególnie podziękować:\n" "\n" "ChenGang\n" "\n" "\n" "\n" "\n" "\n" "..." #: src/HelpDialog.cpp:128 msgid "More About Iptux" msgstr "Więcej o Iptux" #: src/LogSystem.cpp:53 #, c-format msgid "Recevied-From: Nickname:%s User:%s Host:%s" msgstr "Otrzymane od: Nick:%s Użytkownik:%s Host:%s" #: src/LogSystem.cpp:57 #, c-format msgid "Send-To: Nickname:%s User:%s Host:%s" msgstr "Wysłane do: Nick:%s Użytkownik:%s Host:%s" #: src/LogSystem.cpp:60 msgid "Send-Broadcast" msgstr "Wysłane-Rozgłoszenie" #: src/LogSystem.cpp:83 #, c-format msgid "User:%s Host:%s" msgstr "Użytkownik:%s Host:%s" #: src/MainWindow.cpp:603 msgid "Files Transmission Management" msgstr "Narzędzie Transmisji Plików" #: src/MainWindow.cpp:718 msgid "Pals Online: 0" msgstr "Znajomych Online: 0" #: src/MainWindow.cpp:801 msgid "Search Pals" msgstr "Szukaj Znajomych" #: src/MainWindow.cpp:824 src/StatusIcon.cpp:185 msgid "_Detect" msgstr "_Wykryj" #: src/MainWindow.cpp:833 msgid "_Find" msgstr "_Znajdź" #: src/MainWindow.cpp:845 src/StatusIcon.cpp:194 msgid "_Quit" msgstr "_Zakończ" #: src/MainWindow.cpp:871 src/StatusIcon.cpp:164 msgid "_Preferences" msgstr "_Preferencje" #: src/MainWindow.cpp:880 src/StatusIcon.cpp:156 msgid "_Transmission" msgstr "_Transmisja" #: src/MainWindow.cpp:889 src/StatusIcon.cpp:173 msgid "_Shared Management" msgstr "_Zarządzanie Współdzieleniem Plików i Folderów" #: src/MainWindow.cpp:898 msgid "_Sort" msgstr "_Sortuj" #: src/MainWindow.cpp:936 msgid "_Update" msgstr "_Aktualizuj" #: src/MainWindow.cpp:953 #, fuzzy msgid "http://code.google.com/p/iptux/wiki/FAQ?wl=en" msgstr "http://code.google.com/p/iptux/wiki/FAQ_EnglishVersion" #: src/MainWindow.cpp:957 msgid "_Help" msgstr "_Pomoc" #: src/MainWindow.cpp:965 msgid "_More" msgstr "_Więcej" #: src/MainWindow.cpp:969 msgid "_FAQ" msgstr "_FAQ" #: src/MainWindow.cpp:1121 msgid "Nickname" msgstr "Nick" #: src/MainWindow.cpp:1132 msgid "Group" msgstr "Grupa" #: src/MainWindow.cpp:1138 src/MainWindow.cpp:1201 msgid "IPv4" msgstr "IPv4" #: src/MainWindow.cpp:1144 msgid "User" msgstr "Użytkownik" #: src/MainWindow.cpp:1150 msgid "Host" msgstr "Host" #: src/MainWindow.cpp:1183 msgid "State" msgstr "Stan" #: src/MainWindow.cpp:1189 msgid "Task" msgstr "Zadanie" #: src/MainWindow.cpp:1195 msgid "Peer" msgstr "Partner" #: src/MainWindow.cpp:1207 msgid "Filename" msgstr "Nazwa pliku" #: src/MainWindow.cpp:1219 msgid "Completed" msgstr "Zakończone" #: src/MainWindow.cpp:1225 msgid "Progress" msgstr "Postęp" #: src/MainWindow.cpp:1231 msgid "Cost" msgstr "Koszt" #: src/MainWindow.cpp:1237 msgid "Remaining" msgstr "Pozostało" #: src/MainWindow.cpp:1243 msgid "Rate" msgstr "Szybkość" #: src/MainWindow.cpp:1534 msgid "Open This File" msgstr "" #: src/MainWindow.cpp:1540 msgid "Open Containing Folder" msgstr "" #: src/MainWindow.cpp:1546 msgid "Terminate Task" msgstr "Zakończ Zadanie" #: src/MainWindow.cpp:1551 msgid "Terminate All" msgstr "Zakończ Wszystkie" #: src/MainWindow.cpp:1556 msgid "Clear Tasklist" msgstr "Wyczyśc Listę Zadań" #: src/MainWindow.cpp:1577 msgid "Send Message" msgstr "Wyślij wiadomość" #: src/MainWindow.cpp:1611 msgid "Change Info." msgstr "Zmień Info." #: src/MainWindow.cpp:1626 msgid "Delete Pal" msgstr "Usuń Kontakt" #: src/MainWindow.cpp:1715 #, c-format msgid "Pals Online: %" msgstr "Znajomi Online: %" #: src/MainWindow.cpp:1946 msgid "The file you want to open not exist!" msgstr "" #: src/MainWindow.cpp:1975 msgid "The path you want to open not exist!" msgstr "" #: src/output.cpp:35 msgid "Infomation" msgstr "Infomacje" #: src/output.cpp:60 msgid "Warning" msgstr "Ostrzeżenie" #: src/output.cpp:83 msgid "Error" msgstr "Błąd" #: src/ProgramData.cpp:216 msgid "utf-16" msgstr "utf-16" #: src/ProgramData.cpp:219 msgid "utf-8" msgstr "utf-8" #: src/RecvFileData.cpp:117 msgid "receive" msgstr "odbiór" #: src/RecvFileData.cpp:184 #, c-format msgid "Failed to receive the file \"%s\" from %s!" msgstr "Błąd odbioru pliku \"%s\" od %s!" #: src/RecvFileData.cpp:187 #, c-format msgid "Receive the file \"%s\" from %s successfully!" msgstr "Odbiór pliku \"%s\" od %s zakończony powodzeniem!" #: src/RecvFileData.cpp:332 #, c-format msgid "Failed to receive the directory \"%s\" from %s!" msgstr "Błąd odbioru katalogu \"%s\" od %s!" #: src/RecvFileData.cpp:335 #, c-format msgid "Receive the directory \"%s\" from %s successfully!" msgstr "Odbiór katalogu \"%s\" od %s zakończony powodzeniem!" #: src/RevisePal.cpp:97 msgid "Change Pal's Information" msgstr "Zmień Informacje o znajomym" #: src/RevisePal.cpp:125 msgid "Pal's nickname:" msgstr "Nick Znajomego:" #: src/RevisePal.cpp:131 msgid "Please input pal's new nickname!" msgstr "Wpisz nowy nick znajomego!" #: src/RevisePal.cpp:137 msgid "Pal's group name:" msgstr "Nazwa grupy Znajomego" #: src/RevisePal.cpp:143 msgid "Please input pal's new group name!" msgstr "Wpisz nową nazwę grupy znajomego!" #: src/RevisePal.cpp:149 msgid "System coding:" msgstr "Kodowanie Systemu:" #: src/RevisePal.cpp:155 msgid "Be SURE to know what you are doing!" msgstr "Upewnij się, że WIESZ CO ROBISZ!" #: src/RevisePal.cpp:161 msgid "Pal's face picture:" msgstr "Avatar Znajomego:" #: src/RevisePal.cpp:175 msgid "Be compatible with iptux's protocol (DANGEROUS)" msgstr "Zgodność z protokołem iptux (niebezpieczne)" #: src/SendFileData.cpp:117 msgid "send" msgstr "Wyślij" #: src/SendFileData.cpp:162 #, c-format msgid "Failed to send the file \"%s\" to %s!" msgstr "Błąd wysyłania pliku \"%s\" do %s!" #: src/SendFileData.cpp:165 #, c-format msgid "Send the file \"%s\" to %s successfully!" msgstr "Wysyłanie pliku \"%s\" do %s zakończone powodzeniem!" #: src/SendFileData.cpp:290 #, c-format msgid "Failed to send the directory \"%s\" to %s!" msgstr "Błąd wysyłania katalogu \"%s\" do %s!" #: src/SendFileData.cpp:293 #, c-format msgid "Send the directory \"%s\" to %s successfully!" msgstr "Wysyłanie katalogu \"%s\" do %s zakończone powodzeniem!" #: src/ShareFile.cpp:102 msgid "Shared Files Management" msgstr "Zarządzanie Współdzieleniem Plików" #: src/ShareFile.cpp:105 msgid "OK" msgstr "OK" #: src/ShareFile.cpp:106 msgid "Apply" msgstr "Zastosuj" #: src/ShareFile.cpp:150 msgid "Add Files" msgstr "Dodaj Pliki" #: src/ShareFile.cpp:153 msgid "Add Folders" msgstr "Dodaj Katalogi" #: src/ShareFile.cpp:156 msgid "Delete Resources" msgstr "Usuń Zasoby" #: src/ShareFile.cpp:159 msgid "Clear Password" msgstr "Wyczyśc Hasło" #: src/ShareFile.cpp:162 msgid "Set Password" msgstr "Ustaw hasło" #: src/ShareFile.cpp:220 src/ShareFile.cpp:378 msgid "regular" msgstr "regularny" #: src/ShareFile.cpp:224 src/ShareFile.cpp:382 msgid "directory" msgstr "katalog" #: src/ShareFile.cpp:270 msgid "File" msgstr "Plik" #: src/ShareFile.cpp:286 msgid "Type" msgstr "Typ" #: src/ShareFile.cpp:422 msgid "Choose the files to share" msgstr "Wybierz pliki do współdzielenia" #: src/ShareFile.cpp:425 msgid "Choose the folders to share" msgstr "Wybierz katalogi do współdzielenia" #: src/SoundSystem.cpp:153 #, c-format msgid "Failed to play the prompt tone, %s\n" msgstr "Nie udało się odtworzyć dźwięku polecenia,% s\n" #: src/StatusIcon.cpp:102 src/StatusIcon.cpp:274 #, c-format msgid "To be read: %u messages" msgstr "Do przeczytania: %u wiadomości" #: src/StatusIcon.cpp:143 msgid "_Hide" msgstr "_Ukryj" #: src/StatusIcon.cpp:145 msgid "_Show" msgstr "_Pokaż" #: src/support.cpp:44 msgid "Loading the process successfully!" msgstr "Proces załadowany pomyślnie" #: src/support.cpp:63 msgid "The process is about to quit!" msgstr "Proces zostanie zakończony" #: src/support.cpp:102 #, c-format msgid "iptux: A software for sharing in LAN\n" msgstr "iptux: Program do komunikacji w sieciach LAN\n" #: src/support.cpp:103 #, c-format msgid "" "\t-h --help\n" "\t\tdisplay this help and exit\n" msgstr "" "\t-h --help\n" "\t\twyświetlenie pomocy i zakończenie\n" #: src/support.cpp:104 #, c-format msgid "" "\t-v --version\n" "\t\toutput version information and exit\n" msgstr "" "\t-v --version\n" "\t\twyświetlenie informacji o wersji i zakończenie\n" #: src/support.cpp:120 #, c-format msgid "What do you want to do?\n" msgstr "Co chcesz robić?\n" #: src/support.cpp:149 msgid "Can't find any available web browser!\n" msgstr "Nie można znaleźć żadnej dostępnej przeglądarki internetowej!\n" #: src/support.cpp:179 #, c-format msgid "" "Fatal Error!!\n" "Failed to bind the TCP/UDP port(2425)!\n" "%s" msgstr "" "Błąd krytyczny!\n" "Nie można połączyć się z portem TCP/UDP (2425)!\n" "%s" #: src/UdpData.cpp:133 src/UdpData.cpp:134 src/UdpData.cpp:569 #: src/UdpData.cpp:606 msgid "mysterious" msgstr "tajemniczy" #: src/uninstall/utils.cpp:23 msgid "The user is not privileged!\n" msgstr "Użytkownik nie ma uprawnień!\n" #: src/uninstall/utils.cpp:34 #, c-format msgid "Opendir() directory \"%s\" failed, %s\n" msgstr "Opendir() katalog \"%s\" błąd, %s\n" #: src/uninstall/utils.cpp:45 #, c-format msgid "Stat() file \"%s\" failed, %s\n" msgstr "Stat() plik \"%s\" błąd, %s\n" #: src/uninstall/utils.cpp:51 src/uninstall/utils.cpp:67 #, c-format msgid "Unlink() file \"%s\" failed, %s\n" msgstr "Unlink() plik \"%s\" błąd, %s\n" #: src/uninstall/utils.cpp:61 #, c-format msgid "Rmdir() directory \"%s\" failed, %s\n" msgstr "Rmdir() katalog \"%s\" błąd, %s\n" #~ msgid "Pal's Shared Resources" #~ msgstr "Współdzielone Zasoby Znajomych" #~ msgid "Files Receive Management" #~ msgstr "Zarządzanie Odbiorem Plików" #~ msgid "Recv" #~ msgstr "Odebrane" #~ msgid "Free:%s Total:%s" #~ msgstr "Pozostało:%s Wszystko:%s" iptux-0.6.3/po/zh_CN.po000066400000000000000000000612341257720006400146610ustar00rootroot00000000000000# translation of zh_CN.po to Chinese Simplify # Copyright (C) 2009 THE IPTUX'S COPYRIGHT HOLDER # This file is distributed under the same license as the IPTUX package. # Jally , 2008, 2009. # ManPT , 2009. msgid "" msgstr "" "Project-Id-Version: zh_CN\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-02-06 19:16+0800\n" "PO-Revision-Date: 2010-03-26 00:20+0800\n" "Last-Translator: zhangjiejing \n" "Language-Team: Chinese Simplify\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Lokalize 0.3\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" #: src/AnalogFS.cpp:84 src/AnalogFS.cpp:89 #, c-format msgid "Open() file \"%s\" failed, %s" msgstr "打开文件\"%s\"失败,%s" #: src/AnalogFS.cpp:109 #, c-format msgid "Stat64() file \"%s\" failed, %s" msgstr "获取文件\"%s\"状态失败,%s" #: src/AnalogFS.cpp:130 #, c-format msgid "Mkdir() directory \"%s\" failed, %s" msgstr "创建文件夹\"%s\"失败,%s" #: src/AnalogFS.cpp:145 #, fuzzy, c-format msgid "opendir on \"%s\" failed: %s" msgstr "打开文件夹\"%s\"失败,%s" #: src/AnalogFS.cpp:191 #, c-format msgid "Opendir() directory \"%s\" failed, %s" msgstr "打开文件夹\"%s\"失败,%s" #: src/Command.cpp:221 msgid "Your pal didn't receive the packet. He or she is offline maybe." msgstr "你的好友没有接收到此数据包,他可能已经下线。" #: src/CoreThread.cpp:231 src/DialogPeer.cpp:762 src/RecvFileData.cpp:152 #: src/RecvFileData.cpp:212 src/support.cpp:166 #, c-format msgid "" "Fatal Error!!\n" "Failed to create new socket!\n" "%s" msgstr "" "致命错误!!\n" "创建新的套接口失败!\n" "%s" #: src/CoreThread.cpp:556 src/CoreThread.cpp:581 src/CoreThread.cpp:1121 #: src/CoreThread.cpp:1147 msgid "Others" msgstr "其他" #: src/CoreThread.cpp:980 src/RecvFileData.cpp:133 src/RecvFileData.cpp:265 #: src/SendFileData.cpp:134 src/SendFileData.cpp:221 src/ShareFile.cpp:228 #: src/ShareFile.cpp:386 msgid "unknown" msgstr "未知" #: src/CoreThread.cpp:994 msgid "" msgstr "<错误>" #: src/CoreThread.cpp:1171 msgid "Broadcast" msgstr "广播" #: src/DataSettings.cpp:56 msgid "Personal" msgstr "个人" #: src/DataSettings.cpp:58 msgid "System" msgstr "系统" #: src/DataSettings.cpp:61 msgid "Sound" msgstr "声音" #: src/DataSettings.cpp:64 msgid "Network" msgstr "网络" #: src/DataSettings.cpp:148 msgid "Preferences" msgstr "参数选择" #: src/DataSettings.cpp:178 msgid "Your nickname:" msgstr "您的昵称:" #: src/DataSettings.cpp:184 msgid "Please input your nickname!" msgstr "请输入您的昵称!" #: src/DataSettings.cpp:189 msgid "Your group name:" msgstr "您的组名:" #: src/DataSettings.cpp:195 msgid "Please input your group name!" msgstr "请输入您的组名!" #: src/DataSettings.cpp:200 msgid "Your face picture:" msgstr "您的头像:" #: src/DataSettings.cpp:213 msgid "Save files to: " msgstr "保存文件到:" #: src/DataSettings.cpp:223 msgid "Photo" msgstr "个人形象" #: src/DataSettings.cpp:235 msgid "Signature" msgstr "个性签名" #: src/DataSettings.cpp:266 msgid "Candidate network coding:" msgstr "候选网络编码:" #: src/DataSettings.cpp:272 msgid "Candidate network coding" msgstr "候选网络编码" #: src/DataSettings.cpp:277 msgid "Preference network coding:" msgstr "首选网络编码:" #: src/DataSettings.cpp:283 msgid "" "Preference network coding (You should be aware of what you are doing if you " "want to modify it.)" msgstr "首选网络编码(如果你想要修改它,那么你必须明白你正在做什么。)" #: src/DataSettings.cpp:289 msgid "Pal's default face picture:" msgstr "好友默认头像:" #: src/DataSettings.cpp:302 msgid "Panel font:" msgstr "面板字体:" #: src/DataSettings.cpp:310 msgid "Automatically open the chat dialog" msgstr "自动打开聊天窗口" #: src/DataSettings.cpp:315 msgid "Automatically hide the panel after login" msgstr "程序启动之后自动隐藏面板" #: src/DataSettings.cpp:320 msgid "Automatically open the File Transmission Management" msgstr "自动打开文件传输管理器" #: src/DataSettings.cpp:325 msgid "Use the 'Enter' key to send message" msgstr "使用Enter键发送消息" #: src/DataSettings.cpp:330 msgid "Automatically clean up the chat history" msgstr "自动清空聊天历史记录" #: src/DataSettings.cpp:335 msgid "Save the chat history" msgstr "保存聊天历史" #: src/DataSettings.cpp:340 msgid "Use the Blacklist (NOT recommended)" msgstr "开启黑名单处理方案(不推荐)" #: src/DataSettings.cpp:345 msgid "Filter the request of sharing files" msgstr "过滤好友对共享文件的请求" #: src/DataSettings.cpp:367 msgid "Activate the sound support" msgstr "启动声音支持" #: src/DataSettings.cpp:374 msgid "Volume Control: " msgstr "音量控制:" #: src/DataSettings.cpp:383 msgid "Sound Event" msgstr "声音事件" #: src/DataSettings.cpp:411 msgid "Test" msgstr "测试" #: src/DataSettings.cpp:414 msgid "Stop" msgstr "停止" #: src/DataSettings.cpp:437 msgid "From:" msgstr "起始:" #: src/DataSettings.cpp:443 msgid "Beginning of the IP(v4) section" msgstr "IP(v4)网络段起始点" #: src/DataSettings.cpp:446 msgid "To:" msgstr "终止:" #: src/DataSettings.cpp:452 msgid "End of the IP(v4) section" msgstr "IP(v4)网络段终止点" #: src/DataSettings.cpp:459 msgid "Add" msgstr "增添" #: src/DataSettings.cpp:463 msgid "Delete" msgstr "删除" #: src/DataSettings.cpp:469 msgid "Added IP(v4) Section:" msgstr "已添加的IP(v4)网段:" #: src/DataSettings.cpp:488 msgid "Import" msgstr "导入" #: src/DataSettings.cpp:491 msgid "Export" msgstr "导出" #: src/DataSettings.cpp:494 msgid "Clear" msgstr "清空" #: src/DataSettings.cpp:709 msgid "Transfer finished" msgstr "传输完成" #: src/DataSettings.cpp:714 msgid "Message received" msgstr "收到消息" #: src/DataSettings.cpp:775 msgid "Play" msgstr "播放" #: src/DataSettings.cpp:782 msgid "Event" msgstr "事件" #: src/DataSettings.cpp:816 msgid "From" msgstr "起始" #: src/DataSettings.cpp:822 msgid "To" msgstr "终止" #: src/DataSettings.cpp:830 msgid "Description" msgstr "描述" #: src/DataSettings.cpp:847 msgid "Please select download folder" msgstr "请选择下载文件夹" #: src/DataSettings.cpp:869 msgid "Select Font" msgstr "选择字体" #: src/DataSettings.cpp:882 msgid "Please select a sound file" msgstr "请选择一个声音文件" #: src/DataSettings.cpp:1157 src/DataSettings.cpp:1189 #, c-format msgid "" "Fopen() file \"%s\" failed!\n" "%s" msgstr "" "打开文件\"%s\"失败!\n" "%s" #: src/DataSettings.cpp:1238 src/DialogGroup.cpp:647 msgid "Select All" msgstr "全选" #: src/DataSettings.cpp:1243 src/DialogGroup.cpp:652 msgid "Reverse Select" msgstr "反选" #: src/DataSettings.cpp:1248 src/DialogGroup.cpp:657 msgid "Clear Up" msgstr "清空" #: src/DataSettings.cpp:1342 src/RevisePal.cpp:426 msgid "Please select a face picture" msgstr "请选择一个头像图片" #: src/DataSettings.cpp:1365 msgid "Please select a personal photo" msgstr "请选择个人形象照片" #: src/DataSettings.cpp:1509 src/DataSettings.cpp:1516 src/DetectPal.cpp:122 #, c-format msgid "" "\n" "Illegal IP(v4) address: %s!" msgstr "" "\n" "非法的IP(v4)地址:%s!" #: src/DataSettings.cpp:1614 msgid "Please select a file to import data" msgstr "请选择导入数据的文件" #: src/DataSettings.cpp:1662 msgid "Save data to file" msgstr "保存数据到文件" #: src/DetectPal.cpp:70 msgid "Detect pals" msgstr "探测好友" #: src/DetectPal.cpp:72 msgid "Detect" msgstr "探测" #: src/DetectPal.cpp:73 src/ShareFile.cpp:107 msgid "Cancel" msgstr "取消" #: src/DetectPal.cpp:91 msgid "Please input an IP address (IPv4 only):" msgstr "请输入IP地址(限IPv4格式):" #: src/DetectPal.cpp:99 msgid "Please input an IP address (IPv4 only)!" msgstr "请输入IP地址(限IPv4格式)!" #: src/DetectPal.cpp:127 #, c-format msgid "The notification has been sent to %s." msgstr "通知已经发送到%s。" #: src/dialog.cpp:34 msgid "" "File transfer has not been completed.\n" "Are you sure to cancel and quit?" msgstr "" "文件传输尚未完成。\n" "你确定要取消任务并退出吗?" #: src/dialog.cpp:37 msgid "Confirm Exit" msgstr "确认退出" #: src/dialog.cpp:57 src/DialogPeer.cpp:379 src/MainWindow.cpp:1597 msgid "Request Shared Resources" msgstr "请求共享资源" #: src/dialog.cpp:60 msgid "Agree" msgstr "允许" #: src/dialog.cpp:61 src/DialogPeer.cpp:848 msgid "Refuse" msgstr "拒绝" #: src/dialog.cpp:74 #, c-format msgid "" "Your pal (%s)[%s]\n" "is requesting to get your shared resources,\n" "Do you agree?" msgstr "" "您的好友(%s)[%s]\n" "请求获取您的共享资源,\n" "是否允许?" #: src/dialog.cpp:103 msgid "Access Password" msgstr "获取密码" #: src/dialog.cpp:110 msgid "Please input the password for the shared files behind" msgstr "请输入获取共享文件的密码" #: src/dialog.cpp:123 #, c-format msgid "(%s)[%s]Password:" msgstr "(%s)[%s]密码: " #: src/dialog.cpp:140 src/dialog.cpp:200 msgid "" "\n" "Empty Password!" msgstr "" "\n" "密码为空!" #: src/dialog.cpp:163 msgid "Enter a New Password" msgstr "输入一个新的密码" #: src/dialog.cpp:173 msgid "Password: " msgstr "密码: " #: src/dialog.cpp:181 msgid "Repeat: " msgstr "重复: " #: src/dialog.cpp:195 msgid "" "\n" "Password Mismatched!" msgstr "" "\n" "密码不一致!" #: src/dialog.cpp:226 #, fuzzy msgid "Please select a folder to save files." msgstr "请选择一个声音文件" #: src/DialogGroup.cpp:277 #, c-format msgid "Talk with the group %s" msgstr "与%s组对话" #: src/DialogGroup.cpp:371 msgid "Member" msgstr "成员" #: src/DialogGroup.cpp:465 msgid "Send" msgstr "发送" #: src/DialogGroup.cpp:472 msgid "Pals" msgstr "好友" #: src/DialogGroup.cpp:495 src/DialogPeer.cpp:409 src/MainWindow.cpp:865 msgid "_Tools" msgstr "工具(_T)" #: src/DialogGroup.cpp:501 src/DialogPeer.cpp:417 msgid "Clear Buffer" msgstr "清空缓冲" #: src/DialogGroup.cpp:508 msgid "Sort" msgstr "排序" #: src/DialogGroup.cpp:514 src/MainWindow.cpp:904 msgid "By Nickname" msgstr "按昵称" #: src/DialogGroup.cpp:521 src/MainWindow.cpp:911 msgid "By IP" msgstr "按 IP" #: src/DialogGroup.cpp:531 src/MainWindow.cpp:921 msgid "Ascending" msgstr "升序" #: src/DialogGroup.cpp:538 src/MainWindow.cpp:928 msgid "Descending" msgstr "降序" #: src/DialogPeer.cpp:231 #, fuzzy, c-format msgid "Talk with %s(%s) IP:%s" msgstr "与%s对话" #: src/DialogPeer.cpp:329 msgid "Info." msgstr "信息" #: src/DialogPeer.cpp:363 src/MainWindow.cpp:819 msgid "_File" msgstr "文件(_F)" #: src/DialogPeer.cpp:367 msgid "Attach File" msgstr "增添文件" #: src/DialogPeer.cpp:373 msgid "Attach Folder" msgstr "增添目录" #: src/DialogPeer.cpp:389 msgid "Close" msgstr "关闭" #: src/DialogPeer.cpp:413 msgid "Insert Picture" msgstr "插入图片" #: src/DialogPeer.cpp:438 src/MainWindow.cpp:1653 #, c-format msgid "Version: %s\n" msgstr "版本: %s\n" #: src/DialogPeer.cpp:442 src/MainWindow.cpp:1657 #, c-format msgid "Nickname: %s@%s\n" msgstr "昵称: %s@%s\n" #: src/DialogPeer.cpp:444 src/MainWindow.cpp:1659 #, c-format msgid "Nickname: %s\n" msgstr "昵称: %s\n" #: src/DialogPeer.cpp:447 src/MainWindow.cpp:1662 #, c-format msgid "User: %s\n" msgstr "用户: %s\n" #: src/DialogPeer.cpp:450 src/MainWindow.cpp:1665 #, c-format msgid "Host: %s\n" msgstr "主机: %s\n" #: src/DialogPeer.cpp:455 src/MainWindow.cpp:1670 #, c-format msgid "Address: %s(%s)\n" msgstr "地址: %s(%s)\n" #: src/DialogPeer.cpp:457 src/MainWindow.cpp:1672 #, c-format msgid "Address: %s\n" msgstr "地址: %s\n" #: src/DialogPeer.cpp:461 src/MainWindow.cpp:1676 #, c-format msgid "Compatibility: Microsoft\n" msgstr "兼容性: Microsoft\n" #: src/DialogPeer.cpp:463 src/MainWindow.cpp:1678 #, c-format msgid "Compatibility: GNU/Linux\n" msgstr "兼容性: GNU/Linux\n" #: src/DialogPeer.cpp:466 src/MainWindow.cpp:1681 #, c-format msgid "System coding: %s\n" msgstr "系统编码: %s\n" #: src/DialogPeer.cpp:470 src/MainWindow.cpp:1685 msgid "Signature:\n" msgstr "个性签名:\n" #: src/DialogPeer.cpp:477 msgid "" "\n" "Photo:\n" msgstr "" "\n" "个人形象:\n" #: src/DialogPeer.cpp:722 msgid "Please select a picture to insert the buffer" msgstr "请选择插入缓冲区的图片" #: src/DialogPeer.cpp:789 #, fuzzy msgid "Enclosure." msgstr "附件" #: src/DialogPeer.cpp:836 msgid "File to be receive." msgstr "" #: src/DialogPeer.cpp:840 msgid "Receiving progress." msgstr "" #: src/DialogPeer.cpp:843 msgid "Accept" msgstr "接受" #: src/DialogPeer.cpp:853 msgid "Detial" msgstr "" #: src/DialogPeer.cpp:884 #, fuzzy msgid "File received." msgstr "收到消息" #: src/DialogPeer.cpp:926 src/DialogPeer.cpp:990 msgid "Source" msgstr "来源" #: src/DialogPeer.cpp:932 msgid "SaveAs" msgstr "" #: src/DialogPeer.cpp:937 src/DialogPeer.cpp:1000 src/MainWindow.cpp:1213 #: src/ShareFile.cpp:280 msgid "Size" msgstr "大小" #: src/DialogPeer.cpp:995 msgid "Name" msgstr "" #: src/DialogPeer.cpp:1096 src/DialogPeer.cpp:1169 #, c-format msgid "Receiving Progress." msgstr "" #: src/DialogPeer.cpp:1099 src/DialogPeer.cpp:1172 #, c-format msgid "%s to Receive." msgstr "" #: src/DialogPeer.cpp:1103 src/DialogPeer.cpp:1176 #, c-format msgid "%s Of %s Received." msgstr "" #: src/DialogPeer.cpp:1109 #, fuzzy, c-format msgid "Mission Completed!" msgstr "已完成" #: src/DialogPeer.cpp:1321 #, fuzzy msgid "Remove Selected" msgstr "反选" #: src/HelpDialog.cpp:61 src/HelpDialog.cpp:66 msgid "Jally " msgstr "" #: src/HelpDialog.cpp:62 src/HelpDialog.cpp:68 msgid "ManPT " msgstr "" #: src/HelpDialog.cpp:67 msgid "LiWeijian " msgstr "牛牛 " #: src/HelpDialog.cpp:71 msgid "" "alick \n" "ManPT " msgstr "" "alick \n" "ManPT " #: src/HelpDialog.cpp:80 src/MainWindow.cpp:576 src/StatusIcon.cpp:106 #: src/StatusIcon.cpp:277 msgid "iptux" msgstr "信使(iptux)" #: src/HelpDialog.cpp:85 msgid "A GTK+ based LAN Messenger." msgstr "基于GTK+的局域网通信工具" #: src/HelpDialog.cpp:102 msgid "Help" msgstr "帮助" #: src/HelpDialog.cpp:102 msgid "Contributers" msgstr "贡献者" #: src/HelpDialog.cpp:102 src/HelpDialog.cpp:120 msgid "..." msgstr "..." #: src/HelpDialog.cpp:104 #, fuzzy msgid "" "Project Home: \n" "https://github.com/iptux-src/iptux\n" "\n" "User and Developer Group: \n" "https://groups.google.com/group/iptux/\n" "\n" "Note that you can get help form the project wiki page.\n" "\n" "If you find no solutions in any of the existed documents, feel free to drop " "a email at iptux@googlegroups.com, lots of users and developers would be " "glade to help about your problems." msgstr "" "项目主页: \n" "http://code.google.com/p/iptux/\n" "\n" "用户邮件组: \n" "https://groups.google.com/group/iptux/\n" "\n" "遇到问题时,麻烦留意一下项目Wiki页面,会得到不少帮助信息。\n" "\n" "如果仍然找不到解决的办法,欢迎发信到邮件组iptux@googlegroups.com,我们会乐意" "帮助你解决问题。" #: src/HelpDialog.cpp:110 msgid "" "It's an honor that iptux was contributed voluntarilly by many people. " "Without your help, iptux could never make it.\n" "\n" "Especially, Here's some we would like to thank much:\n" "\n" "ChenGang\n" "\n" "\n" "\n" "\n" "\n" "..." msgstr "" #: src/HelpDialog.cpp:128 msgid "More About Iptux" msgstr "更多..." #: src/LogSystem.cpp:53 #, c-format msgid "Recevied-From: Nickname:%s User:%s Host:%s" msgstr "来自: 昵称:%s 用户:%s 主机:%s" #: src/LogSystem.cpp:57 #, c-format msgid "Send-To: Nickname:%s User:%s Host:%s" msgstr "发往: 昵称:%s 用户:%s 主机:%s" #: src/LogSystem.cpp:60 msgid "Send-Broadcast" msgstr "发送广播" #: src/LogSystem.cpp:83 #, c-format msgid "User:%s Host:%s" msgstr "用户:%s 主机:%s" #: src/MainWindow.cpp:603 msgid "Files Transmission Management" msgstr "文件传输管理器" #: src/MainWindow.cpp:718 msgid "Pals Online: 0" msgstr "在线好友: 0" #: src/MainWindow.cpp:801 msgid "Search Pals" msgstr "搜索好友" #: src/MainWindow.cpp:824 src/StatusIcon.cpp:185 msgid "_Detect" msgstr "探测(_D)" #: src/MainWindow.cpp:833 msgid "_Find" msgstr "查找(_F)" #: src/MainWindow.cpp:845 src/StatusIcon.cpp:194 msgid "_Quit" msgstr "退出(_Q)" #: src/MainWindow.cpp:871 src/StatusIcon.cpp:164 msgid "_Preferences" msgstr "首选项(_P)" #: src/MainWindow.cpp:880 src/StatusIcon.cpp:156 msgid "_Transmission" msgstr "传输管理器(_T)" #: src/MainWindow.cpp:889 src/StatusIcon.cpp:173 msgid "_Shared Management" msgstr "共享管理器(_S)" #: src/MainWindow.cpp:898 msgid "_Sort" msgstr "排序(_S)" #: src/MainWindow.cpp:936 msgid "_Update" msgstr "刷新(_U)" #: src/MainWindow.cpp:953 #, fuzzy msgid "http://code.google.com/p/iptux/wiki/FAQ?wl=en" msgstr "http://code.google.com/p/iptux/wiki/FAQ" #: src/MainWindow.cpp:957 msgid "_Help" msgstr "帮助(_H)" #: src/MainWindow.cpp:965 msgid "_More" msgstr "更多(_M)" #: src/MainWindow.cpp:969 msgid "_FAQ" msgstr "FAQ(_F)" #: src/MainWindow.cpp:1121 msgid "Nickname" msgstr "昵称" #: src/MainWindow.cpp:1132 msgid "Group" msgstr "组名" #: src/MainWindow.cpp:1138 src/MainWindow.cpp:1201 msgid "IPv4" msgstr "IPv4" #: src/MainWindow.cpp:1144 msgid "User" msgstr "用户" #: src/MainWindow.cpp:1150 msgid "Host" msgstr "主机" #: src/MainWindow.cpp:1183 msgid "State" msgstr "状态" #: src/MainWindow.cpp:1189 msgid "Task" msgstr "任务" #: src/MainWindow.cpp:1195 msgid "Peer" msgstr "好友" #: src/MainWindow.cpp:1207 msgid "Filename" msgstr "文件名" #: src/MainWindow.cpp:1219 msgid "Completed" msgstr "已完成" #: src/MainWindow.cpp:1225 msgid "Progress" msgstr "进度" #: src/MainWindow.cpp:1231 msgid "Cost" msgstr "花费时间" #: src/MainWindow.cpp:1237 msgid "Remaining" msgstr "剩余时间" #: src/MainWindow.cpp:1243 msgid "Rate" msgstr "速率" #: src/MainWindow.cpp:1534 msgid "Open This File" msgstr "打开文件" #: src/MainWindow.cpp:1540 msgid "Open Containing Folder" msgstr "打开所在文件夹" #: src/MainWindow.cpp:1546 msgid "Terminate Task" msgstr "终止任务" #: src/MainWindow.cpp:1551 msgid "Terminate All" msgstr "终止所有" #: src/MainWindow.cpp:1556 msgid "Clear Tasklist" msgstr "清理任务" #: src/MainWindow.cpp:1577 msgid "Send Message" msgstr "发送消息" #: src/MainWindow.cpp:1611 msgid "Change Info." msgstr "更改信息" #: src/MainWindow.cpp:1626 msgid "Delete Pal" msgstr "删除好友" #: src/MainWindow.cpp:1715 #, c-format msgid "Pals Online: %" msgstr "在线好友: %" #: src/MainWindow.cpp:1946 msgid "The file you want to open not exist!" msgstr "" #: src/MainWindow.cpp:1975 msgid "The path you want to open not exist!" msgstr "" #: src/output.cpp:35 msgid "Infomation" msgstr "信息" #: src/output.cpp:60 msgid "Warning" msgstr "警告" #: src/output.cpp:83 msgid "Error" msgstr "错误" #: src/ProgramData.cpp:216 msgid "utf-16" msgstr "gb18030,big5" #: src/ProgramData.cpp:219 msgid "utf-8" msgstr "gb18030" #: src/RecvFileData.cpp:117 msgid "receive" msgstr "接收" #: src/RecvFileData.cpp:184 #, c-format msgid "Failed to receive the file \"%s\" from %s!" msgstr "接收文件\"%s\"来自%s失败!" #: src/RecvFileData.cpp:187 #, c-format msgid "Receive the file \"%s\" from %s successfully!" msgstr "接收文件\"%s\"来自%s成功!" #: src/RecvFileData.cpp:332 #, c-format msgid "Failed to receive the directory \"%s\" from %s!" msgstr "接收文件夹\"%s\"来自%s失败!" #: src/RecvFileData.cpp:335 #, c-format msgid "Receive the directory \"%s\" from %s successfully!" msgstr "接收文件夹\"%s\"来自%s成功!" #: src/RevisePal.cpp:97 msgid "Change Pal's Information" msgstr "更改好友信息" #: src/RevisePal.cpp:125 msgid "Pal's nickname:" msgstr "好友昵称:" #: src/RevisePal.cpp:131 msgid "Please input pal's new nickname!" msgstr "请输入好友的新昵称!" #: src/RevisePal.cpp:137 msgid "Pal's group name:" msgstr "好友组名:" #: src/RevisePal.cpp:143 msgid "Please input pal's new group name!" msgstr "请输入好友的新组名!" #: src/RevisePal.cpp:149 msgid "System coding:" msgstr "系统编码:" #: src/RevisePal.cpp:155 msgid "Be SURE to know what you are doing!" msgstr "你最好明白你到底在做些什么!" #: src/RevisePal.cpp:161 msgid "Pal's face picture:" msgstr "好友头像:" #: src/RevisePal.cpp:175 msgid "Be compatible with iptux's protocol (DANGEROUS)" msgstr "兼容 iptux 扩展协议(危险)" #: src/SendFileData.cpp:117 msgid "send" msgstr "发送" #: src/SendFileData.cpp:162 #, c-format msgid "Failed to send the file \"%s\" to %s!" msgstr "发送文件\"%s\"到%s失败!" #: src/SendFileData.cpp:165 #, c-format msgid "Send the file \"%s\" to %s successfully!" msgstr "发送文件\"%s\"到%s成功!" #: src/SendFileData.cpp:290 #, c-format msgid "Failed to send the directory \"%s\" to %s!" msgstr "发送文件夹\"%s\"到%s失败!" #: src/SendFileData.cpp:293 #, c-format msgid "Send the directory \"%s\" to %s successfully!" msgstr "发送文件夹\"%s\"到%s失败!" #: src/ShareFile.cpp:102 msgid "Shared Files Management" msgstr "共享文件管理器" #: src/ShareFile.cpp:105 msgid "OK" msgstr "确定" #: src/ShareFile.cpp:106 msgid "Apply" msgstr "应用" #: src/ShareFile.cpp:150 msgid "Add Files" msgstr "增添文件" #: src/ShareFile.cpp:153 msgid "Add Folders" msgstr "增添目录" #: src/ShareFile.cpp:156 msgid "Delete Resources" msgstr "删除资源" #: src/ShareFile.cpp:159 msgid "Clear Password" msgstr "清除密码" #: src/ShareFile.cpp:162 msgid "Set Password" msgstr "设置密码" #: src/ShareFile.cpp:220 src/ShareFile.cpp:378 msgid "regular" msgstr "常规文件" #: src/ShareFile.cpp:224 src/ShareFile.cpp:382 msgid "directory" msgstr "文件夹" #: src/ShareFile.cpp:270 msgid "File" msgstr "文件" #: src/ShareFile.cpp:286 msgid "Type" msgstr "类型" #: src/ShareFile.cpp:422 msgid "Choose the files to share" msgstr "选择共享文件" #: src/ShareFile.cpp:425 msgid "Choose the folders to share" msgstr "选择共享文件夹" #: src/SoundSystem.cpp:153 #, c-format msgid "Failed to play the prompt tone, %s\n" msgstr "播放提示音失败,%s\n" #: src/StatusIcon.cpp:102 src/StatusIcon.cpp:274 #, c-format msgid "To be read: %u messages" msgstr "未读消息: %u条" #: src/StatusIcon.cpp:143 msgid "_Hide" msgstr "隐藏(_H)" #: src/StatusIcon.cpp:145 msgid "_Show" msgstr "显示(_S)" #: src/support.cpp:44 msgid "Loading the process successfully!" msgstr "进程加载成功!" #: src/support.cpp:63 msgid "The process is about to quit!" msgstr "进程即将退出!" #: src/support.cpp:102 #, c-format msgid "iptux: A software for sharing in LAN\n" msgstr "" #: src/support.cpp:103 #, c-format msgid "" "\t-h --help\n" "\t\tdisplay this help and exit\n" msgstr "" #: src/support.cpp:104 #, c-format msgid "" "\t-v --version\n" "\t\toutput version information and exit\n" msgstr "" #: src/support.cpp:120 #, c-format msgid "What do you want to do?\n" msgstr "" #: src/support.cpp:149 msgid "Can't find any available web browser!\n" msgstr "不能找到可用的浏览器!\n" #: src/support.cpp:179 #, c-format msgid "" "Fatal Error!!\n" "Failed to bind the TCP/UDP port(2425)!\n" "%s" msgstr "" "致命错误!!\n" "绑定TCP/UDP端口(2425)失败!\n" "%s" #: src/UdpData.cpp:133 src/UdpData.cpp:134 src/UdpData.cpp:569 #: src/UdpData.cpp:606 msgid "mysterious" msgstr "神秘来客" #: src/uninstall/utils.cpp:23 msgid "The user is not privileged!\n" msgstr "用户没有特权!\n" #: src/uninstall/utils.cpp:34 #, c-format msgid "Opendir() directory \"%s\" failed, %s\n" msgstr "打开文件夹\"%s\"失败,%s\n" #: src/uninstall/utils.cpp:45 #, c-format msgid "Stat() file \"%s\" failed, %s\n" msgstr "查看文件\"%s\"状态失败,%s\n" #: src/uninstall/utils.cpp:51 src/uninstall/utils.cpp:67 #, c-format msgid "Unlink() file \"%s\" failed, %s\n" msgstr "删除文件\"%s\"失败,%s\n" #: src/uninstall/utils.cpp:61 #, c-format msgid "Rmdir() directory \"%s\" failed, %s\n" msgstr "删除文件夹\"%s\"失败,%s\n" #~ msgid "Pal's Shared Resources" #~ msgstr "好友的共享资源" #~ msgid "Files Receive Management" #~ msgstr "文件接收管理器" #~ msgid "Recv" #~ msgstr "接收" #~ msgid "Free:%s Total:%s" #~ msgstr "空闲:%s 总计:%s" #~ msgid "Chat History" #~ msgstr "聊天历史" #~ msgid "Choose enclosure files" #~ msgstr "选择文件附件" #~ msgid "Choose enclosure folders" #~ msgstr "选择文件夹附件" #~ msgid "" #~ "\n" #~ "Can't send an empty message!!" #~ msgstr "" #~ "\n" #~ "发送内容不能为空!!" iptux-0.6.3/po/zh_TW.po000066400000000000000000000612311257720006400147100ustar00rootroot00000000000000# translation of zh_TW.po to Chinese Traditional # Copyright (C) 2009 THE IPTUX'S COPYRIGHT HOLDER # This file is distributed under the same license as the IPTUX package. # 村仔 , 2009. msgid "" msgstr "" "Project-Id-Version: zh_TW\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-02-06 19:16+0800\n" "PO-Revision-Date: 2010-03-26 00:21+0800\n" "Last-Translator: zhangjiejing \n" "Language-Team: Chinese Traditional\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Lokalize 0.3\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" #: src/AnalogFS.cpp:84 src/AnalogFS.cpp:89 #, c-format msgid "Open() file \"%s\" failed, %s" msgstr "打開檔案\"%s\"失敗,%s" #: src/AnalogFS.cpp:109 #, c-format msgid "Stat64() file \"%s\" failed, %s" msgstr "獲取檔案\"%s\"狀態失敗,%s" #: src/AnalogFS.cpp:130 #, c-format msgid "Mkdir() directory \"%s\" failed, %s" msgstr "建立目錄\"%s\"失敗,%s" #: src/AnalogFS.cpp:145 #, fuzzy, c-format msgid "opendir on \"%s\" failed: %s" msgstr "打開目錄\"%s\"失敗,%s" #: src/AnalogFS.cpp:191 #, c-format msgid "Opendir() directory \"%s\" failed, %s" msgstr "打開目錄\"%s\"失敗,%s" #: src/Command.cpp:221 msgid "Your pal didn't receive the packet. He or she is offline maybe." msgstr "你的好友沒有收到傳送的資料,他可能已經下線。" #: src/CoreThread.cpp:231 src/DialogPeer.cpp:762 src/RecvFileData.cpp:152 #: src/RecvFileData.cpp:212 src/support.cpp:166 #, c-format msgid "" "Fatal Error!!\n" "Failed to create new socket!\n" "%s" msgstr "" "致命錯誤!!\n" "建立新的連接失敗!\n" "%s" #: src/CoreThread.cpp:556 src/CoreThread.cpp:581 src/CoreThread.cpp:1121 #: src/CoreThread.cpp:1147 msgid "Others" msgstr "其他" #: src/CoreThread.cpp:980 src/RecvFileData.cpp:133 src/RecvFileData.cpp:265 #: src/SendFileData.cpp:134 src/SendFileData.cpp:221 src/ShareFile.cpp:228 #: src/ShareFile.cpp:386 msgid "unknown" msgstr "未知" #: src/CoreThread.cpp:994 msgid "" msgstr "<錯誤>" #: src/CoreThread.cpp:1171 msgid "Broadcast" msgstr "廣播" #: src/DataSettings.cpp:56 msgid "Personal" msgstr "個人" #: src/DataSettings.cpp:58 msgid "System" msgstr "系統" #: src/DataSettings.cpp:61 msgid "Sound" msgstr "聲音" #: src/DataSettings.cpp:64 msgid "Network" msgstr "網路" #: src/DataSettings.cpp:148 msgid "Preferences" msgstr "偏好設定" #: src/DataSettings.cpp:178 msgid "Your nickname:" msgstr "您的暱稱:" #: src/DataSettings.cpp:184 msgid "Please input your nickname!" msgstr "請輸入您的暱稱!" #: src/DataSettings.cpp:189 msgid "Your group name:" msgstr "您的群組名稱:" #: src/DataSettings.cpp:195 msgid "Please input your group name!" msgstr "請輸入您的群組名稱!" #: src/DataSettings.cpp:200 msgid "Your face picture:" msgstr "您的頭像:" #: src/DataSettings.cpp:213 msgid "Save files to: " msgstr "檔案存至:" #: src/DataSettings.cpp:223 msgid "Photo" msgstr "個人相片" #: src/DataSettings.cpp:235 msgid "Signature" msgstr "個人簽名" #: src/DataSettings.cpp:266 msgid "Candidate network coding:" msgstr "預設網路編碼:" #: src/DataSettings.cpp:272 msgid "Candidate network coding" msgstr "預設網路編碼" #: src/DataSettings.cpp:277 msgid "Preference network coding:" msgstr "偏好網路編碼:" #: src/DataSettings.cpp:283 msgid "" "Preference network coding (You should be aware of what you are doing if you " "want to modify it.)" msgstr "偏好網路編碼(如果你想要修改它,那麼你必須明白你正在做什麼。)" #: src/DataSettings.cpp:289 msgid "Pal's default face picture:" msgstr "預設好友頭像:" #: src/DataSettings.cpp:302 msgid "Panel font:" msgstr "面板字體:" #: src/DataSettings.cpp:310 msgid "Automatically open the chat dialog" msgstr "自動打開聊天對話框" #: src/DataSettings.cpp:315 msgid "Automatically hide the panel after login" msgstr "程序啟動後隱藏面板" #: src/DataSettings.cpp:320 msgid "Automatically open the File Transmission Management" msgstr "自動打開檔案傳輸管理器" #: src/DataSettings.cpp:325 msgid "Use the 'Enter' key to send message" msgstr "使用Enter鍵傳送訊息" #: src/DataSettings.cpp:330 msgid "Automatically clean up the chat history" msgstr "自動清空聊天記錄" #: src/DataSettings.cpp:335 msgid "Save the chat history" msgstr "儲存聊天記錄" #: src/DataSettings.cpp:340 msgid "Use the Blacklist (NOT recommended)" msgstr "開啟黑名單處理方案(不推薦)" #: src/DataSettings.cpp:345 msgid "Filter the request of sharing files" msgstr "過濾共享檔案請求" #: src/DataSettings.cpp:367 msgid "Activate the sound support" msgstr "啟動聲音支援" #: src/DataSettings.cpp:374 msgid "Volume Control: " msgstr "音量控制:" #: src/DataSettings.cpp:383 msgid "Sound Event" msgstr "聲音事件" #: src/DataSettings.cpp:411 msgid "Test" msgstr "測試" #: src/DataSettings.cpp:414 msgid "Stop" msgstr "停止" #: src/DataSettings.cpp:437 msgid "From:" msgstr "起始:" #: src/DataSettings.cpp:443 msgid "Beginning of the IP(v4) section" msgstr "IP(v4)網路區段起始點" #: src/DataSettings.cpp:446 msgid "To:" msgstr "終止:" #: src/DataSettings.cpp:452 msgid "End of the IP(v4) section" msgstr "IP(v4)網路區段終止點" #: src/DataSettings.cpp:459 msgid "Add" msgstr "新增" #: src/DataSettings.cpp:463 msgid "Delete" msgstr "刪除" #: src/DataSettings.cpp:469 msgid "Added IP(v4) Section:" msgstr "已添加的IP(v4)網路區段:" #: src/DataSettings.cpp:488 msgid "Import" msgstr "匯入" #: src/DataSettings.cpp:491 msgid "Export" msgstr "匯出" #: src/DataSettings.cpp:494 msgid "Clear" msgstr "清空" #: src/DataSettings.cpp:709 msgid "Transfer finished" msgstr "傳輸完成" #: src/DataSettings.cpp:714 msgid "Message received" msgstr "收到訊息" #: src/DataSettings.cpp:775 msgid "Play" msgstr "播放" #: src/DataSettings.cpp:782 msgid "Event" msgstr "事件" #: src/DataSettings.cpp:816 msgid "From" msgstr "起始" #: src/DataSettings.cpp:822 msgid "To" msgstr "終止" #: src/DataSettings.cpp:830 msgid "Description" msgstr "描述" #: src/DataSettings.cpp:847 msgid "Please select download folder" msgstr "請選擇下載目錄" #: src/DataSettings.cpp:869 msgid "Select Font" msgstr "選擇字體" #: src/DataSettings.cpp:882 msgid "Please select a sound file" msgstr "請選擇一個聲音檔案" #: src/DataSettings.cpp:1157 src/DataSettings.cpp:1189 #, c-format msgid "" "Fopen() file \"%s\" failed!\n" "%s" msgstr "" "打開檔案\"%s\"失敗!\n" "%s" #: src/DataSettings.cpp:1238 src/DialogGroup.cpp:647 msgid "Select All" msgstr "全選" #: src/DataSettings.cpp:1243 src/DialogGroup.cpp:652 msgid "Reverse Select" msgstr "反選" #: src/DataSettings.cpp:1248 src/DialogGroup.cpp:657 msgid "Clear Up" msgstr "清空" #: src/DataSettings.cpp:1342 src/RevisePal.cpp:426 msgid "Please select a face picture" msgstr "請選擇一個頭像圖片" #: src/DataSettings.cpp:1365 msgid "Please select a personal photo" msgstr "請選擇個人照片" #: src/DataSettings.cpp:1509 src/DataSettings.cpp:1516 src/DetectPal.cpp:122 #, c-format msgid "" "\n" "Illegal IP(v4) address: %s!" msgstr "" "\n" "非法的IP(v4)位址:%s!" #: src/DataSettings.cpp:1614 msgid "Please select a file to import data" msgstr "請選擇匯入資料的檔案" #: src/DataSettings.cpp:1662 msgid "Save data to file" msgstr "保存資料到檔案" #: src/DetectPal.cpp:70 msgid "Detect pals" msgstr "搜尋好友" #: src/DetectPal.cpp:72 msgid "Detect" msgstr "搜尋" #: src/DetectPal.cpp:73 src/ShareFile.cpp:107 msgid "Cancel" msgstr "取消" #: src/DetectPal.cpp:91 msgid "Please input an IP address (IPv4 only):" msgstr "請輸入IP位址(限IPv4格式):" #: src/DetectPal.cpp:99 msgid "Please input an IP address (IPv4 only)!" msgstr "請輸入IP位址(限IPv4格式)!" #: src/DetectPal.cpp:127 #, c-format msgid "The notification has been sent to %s." msgstr "訊息已經傳送到%s。" #: src/dialog.cpp:34 msgid "" "File transfer has not been completed.\n" "Are you sure to cancel and quit?" msgstr "" "檔案傳輸尚未完成。\n" "你確定要取消任務並退出嗎?" #: src/dialog.cpp:37 msgid "Confirm Exit" msgstr "確認退出" #: src/dialog.cpp:57 src/DialogPeer.cpp:379 src/MainWindow.cpp:1597 msgid "Request Shared Resources" msgstr "請求共享資源" #: src/dialog.cpp:60 msgid "Agree" msgstr "允許" #: src/dialog.cpp:61 src/DialogPeer.cpp:848 msgid "Refuse" msgstr "拒絕" #: src/dialog.cpp:74 #, c-format msgid "" "Your pal (%s)[%s]\n" "is requesting to get your shared resources,\n" "Do you agree?" msgstr "" "您的好友(%s)[%s]\n" "請求獲取您的共享資源,\n" "是否允許?" #: src/dialog.cpp:103 msgid "Access Password" msgstr "存取密碼" #: src/dialog.cpp:110 msgid "Please input the password for the shared files behind" msgstr "請輸入共享檔案的存取密碼" #: src/dialog.cpp:123 #, c-format msgid "(%s)[%s]Password:" msgstr "(%s)[%s]密碼: " #: src/dialog.cpp:140 src/dialog.cpp:200 msgid "" "\n" "Empty Password!" msgstr "" "\n" "密碼為空!" #: src/dialog.cpp:163 msgid "Enter a New Password" msgstr "輸入一個新的密碼" #: src/dialog.cpp:173 msgid "Password: " msgstr "密碼: " #: src/dialog.cpp:181 msgid "Repeat: " msgstr "重複: " #: src/dialog.cpp:195 msgid "" "\n" "Password Mismatched!" msgstr "" "\n" "密碼不一致!" #: src/dialog.cpp:226 #, fuzzy msgid "Please select a folder to save files." msgstr "請選擇一個聲音檔案" #: src/DialogGroup.cpp:277 #, c-format msgid "Talk with the group %s" msgstr "與%s組對話" #: src/DialogGroup.cpp:371 msgid "Member" msgstr "成員" #: src/DialogGroup.cpp:465 msgid "Send" msgstr "傳送" #: src/DialogGroup.cpp:472 msgid "Pals" msgstr "好友" #: src/DialogGroup.cpp:495 src/DialogPeer.cpp:409 src/MainWindow.cpp:865 msgid "_Tools" msgstr "工具(_T)" #: src/DialogGroup.cpp:501 src/DialogPeer.cpp:417 msgid "Clear Buffer" msgstr "清空暫存" #: src/DialogGroup.cpp:508 msgid "Sort" msgstr "排序" #: src/DialogGroup.cpp:514 src/MainWindow.cpp:904 msgid "By Nickname" msgstr "依暱稱" #: src/DialogGroup.cpp:521 src/MainWindow.cpp:911 msgid "By IP" msgstr "依 IP" #: src/DialogGroup.cpp:531 src/MainWindow.cpp:921 msgid "Ascending" msgstr "升冪" #: src/DialogGroup.cpp:538 src/MainWindow.cpp:928 msgid "Descending" msgstr "降冪" #: src/DialogPeer.cpp:231 #, fuzzy, c-format msgid "Talk with %s(%s) IP:%s" msgstr "與%s對話" #: src/DialogPeer.cpp:329 msgid "Info." msgstr "資訊" #: src/DialogPeer.cpp:363 src/MainWindow.cpp:819 msgid "_File" msgstr "檔案(_F)" #: src/DialogPeer.cpp:367 msgid "Attach File" msgstr "新增檔案" #: src/DialogPeer.cpp:373 msgid "Attach Folder" msgstr "新增目錄" #: src/DialogPeer.cpp:389 msgid "Close" msgstr "關閉" #: src/DialogPeer.cpp:413 msgid "Insert Picture" msgstr "插入圖片" #: src/DialogPeer.cpp:438 src/MainWindow.cpp:1653 #, c-format msgid "Version: %s\n" msgstr "版本: %s\n" #: src/DialogPeer.cpp:442 src/MainWindow.cpp:1657 #, c-format msgid "Nickname: %s@%s\n" msgstr "暱稱: %s@%s\n" #: src/DialogPeer.cpp:444 src/MainWindow.cpp:1659 #, c-format msgid "Nickname: %s\n" msgstr "暱稱: %s\n" #: src/DialogPeer.cpp:447 src/MainWindow.cpp:1662 #, c-format msgid "User: %s\n" msgstr "用戶: %s\n" #: src/DialogPeer.cpp:450 src/MainWindow.cpp:1665 #, c-format msgid "Host: %s\n" msgstr "主機: %s\n" #: src/DialogPeer.cpp:455 src/MainWindow.cpp:1670 #, c-format msgid "Address: %s(%s)\n" msgstr "位址: %s(%s)\n" #: src/DialogPeer.cpp:457 src/MainWindow.cpp:1672 #, c-format msgid "Address: %s\n" msgstr "位址: %s\n" #: src/DialogPeer.cpp:461 src/MainWindow.cpp:1676 #, c-format msgid "Compatibility: Microsoft\n" msgstr "相容性: Microsoft\n" #: src/DialogPeer.cpp:463 src/MainWindow.cpp:1678 #, c-format msgid "Compatibility: GNU/Linux\n" msgstr "相容性: GNU/Linux\n" #: src/DialogPeer.cpp:466 src/MainWindow.cpp:1681 #, c-format msgid "System coding: %s\n" msgstr "系統編碼: %s\n" #: src/DialogPeer.cpp:470 src/MainWindow.cpp:1685 msgid "Signature:\n" msgstr "個性簽名:\n" #: src/DialogPeer.cpp:477 msgid "" "\n" "Photo:\n" msgstr "" "\n" "個人頭象:\n" #: src/DialogPeer.cpp:722 msgid "Please select a picture to insert the buffer" msgstr "請選擇插入緩衝區的圖片" #: src/DialogPeer.cpp:789 #, fuzzy msgid "Enclosure." msgstr "附件" #: src/DialogPeer.cpp:836 msgid "File to be receive." msgstr "" #: src/DialogPeer.cpp:840 msgid "Receiving progress." msgstr "" #: src/DialogPeer.cpp:843 msgid "Accept" msgstr "接受" #: src/DialogPeer.cpp:853 msgid "Detial" msgstr "" #: src/DialogPeer.cpp:884 #, fuzzy msgid "File received." msgstr "收到訊息" #: src/DialogPeer.cpp:926 src/DialogPeer.cpp:990 msgid "Source" msgstr "來源" #: src/DialogPeer.cpp:932 msgid "SaveAs" msgstr "" #: src/DialogPeer.cpp:937 src/DialogPeer.cpp:1000 src/MainWindow.cpp:1213 #: src/ShareFile.cpp:280 msgid "Size" msgstr "大小" #: src/DialogPeer.cpp:995 msgid "Name" msgstr "" #: src/DialogPeer.cpp:1096 src/DialogPeer.cpp:1169 #, c-format msgid "Receiving Progress." msgstr "" #: src/DialogPeer.cpp:1099 src/DialogPeer.cpp:1172 #, c-format msgid "%s to Receive." msgstr "" #: src/DialogPeer.cpp:1103 src/DialogPeer.cpp:1176 #, c-format msgid "%s Of %s Received." msgstr "" #: src/DialogPeer.cpp:1109 #, fuzzy, c-format msgid "Mission Completed!" msgstr "已完成" #: src/DialogPeer.cpp:1321 #, fuzzy msgid "Remove Selected" msgstr "反選" #: src/HelpDialog.cpp:61 src/HelpDialog.cpp:66 msgid "Jally " msgstr "" #: src/HelpDialog.cpp:62 src/HelpDialog.cpp:68 msgid "ManPT " msgstr "" #: src/HelpDialog.cpp:67 msgid "LiWeijian " msgstr "牛牛 " #: src/HelpDialog.cpp:71 msgid "" "alick \n" "ManPT " msgstr "" "alick \n" "ManPT \n" "村仔 " #: src/HelpDialog.cpp:80 src/MainWindow.cpp:576 src/StatusIcon.cpp:106 #: src/StatusIcon.cpp:277 msgid "iptux" msgstr "信使(iptux)" #: src/HelpDialog.cpp:85 msgid "A GTK+ based LAN Messenger." msgstr "基於GTK+的區域網路通信工具" #: src/HelpDialog.cpp:102 msgid "Help" msgstr "幫助" #: src/HelpDialog.cpp:102 msgid "Contributers" msgstr "貢獻者" #: src/HelpDialog.cpp:102 src/HelpDialog.cpp:120 msgid "..." msgstr "..." #: src/HelpDialog.cpp:104 #, fuzzy msgid "" "Project Home: \n" "https://github.com/iptux-src/iptux\n" "\n" "User and Developer Group: \n" "https://groups.google.com/group/iptux/\n" "\n" "Note that you can get help form the project wiki page.\n" "\n" "If you find no solutions in any of the existed documents, feel free to drop " "a email at iptux@googlegroups.com, lots of users and developers would be " "glade to help about your problems." msgstr "" "程式發展首頁: \n" "http://code.google.com/p/iptux/\n" "\n" "郵件討論群組: \n" "https://groups.google.com/group/iptux/\n" "\n" "遇到問題時,麻煩留意一下項目Wiki頁面,會得到不少幫助的資訊。\n" "\n" "如果仍然找不到解決的辦法,歡迎發信到郵件群組iptux@googlegroups.com,我們會樂" "意幫助你解決問題。" #: src/HelpDialog.cpp:110 msgid "" "It's an honor that iptux was contributed voluntarilly by many people. " "Without your help, iptux could never make it.\n" "\n" "Especially, Here's some we would like to thank much:\n" "\n" "ChenGang\n" "\n" "\n" "\n" "\n" "\n" "..." msgstr "" #: src/HelpDialog.cpp:128 msgid "More About Iptux" msgstr "更多..." #: src/LogSystem.cpp:53 #, c-format msgid "Recevied-From: Nickname:%s User:%s Host:%s" msgstr "来自: 昵称:%s 用户:%s 主機:%s" #: src/LogSystem.cpp:57 #, c-format msgid "Send-To: Nickname:%s User:%s Host:%s" msgstr "傳送: 暱稱:%s 用戶:%s 主機:%s" #: src/LogSystem.cpp:60 msgid "Send-Broadcast" msgstr "傳送廣播" #: src/LogSystem.cpp:83 #, c-format msgid "User:%s Host:%s" msgstr "用戶:%s 主機:%s" #: src/MainWindow.cpp:603 msgid "Files Transmission Management" msgstr "檔案傳輸管理器" #: src/MainWindow.cpp:718 msgid "Pals Online: 0" msgstr "線上好友: 0" #: src/MainWindow.cpp:801 msgid "Search Pals" msgstr "搜尋好友" #: src/MainWindow.cpp:824 src/StatusIcon.cpp:185 msgid "_Detect" msgstr "搜尋(_D)" #: src/MainWindow.cpp:833 msgid "_Find" msgstr "尋找(_F)" #: src/MainWindow.cpp:845 src/StatusIcon.cpp:194 msgid "_Quit" msgstr "退出(_Q)" #: src/MainWindow.cpp:871 src/StatusIcon.cpp:164 msgid "_Preferences" msgstr "偏好設定(_P)" #: src/MainWindow.cpp:880 src/StatusIcon.cpp:156 msgid "_Transmission" msgstr "傳輸管理器(_T)" #: src/MainWindow.cpp:889 src/StatusIcon.cpp:173 msgid "_Shared Management" msgstr "共享管理器(_S)" #: src/MainWindow.cpp:898 msgid "_Sort" msgstr "排序(_S)" #: src/MainWindow.cpp:936 msgid "_Update" msgstr "更新(_U)" #: src/MainWindow.cpp:953 #, fuzzy msgid "http://code.google.com/p/iptux/wiki/FAQ?wl=en" msgstr "http://code.google.com/p/iptux/wiki/FAQ" #: src/MainWindow.cpp:957 msgid "_Help" msgstr "幫助(_H)" #: src/MainWindow.cpp:965 msgid "_More" msgstr "更多(_M)" #: src/MainWindow.cpp:969 msgid "_FAQ" msgstr "FAQ(_F)" #: src/MainWindow.cpp:1121 msgid "Nickname" msgstr "暱稱" #: src/MainWindow.cpp:1132 msgid "Group" msgstr "群組名稱" #: src/MainWindow.cpp:1138 src/MainWindow.cpp:1201 msgid "IPv4" msgstr "IPv4" #: src/MainWindow.cpp:1144 msgid "User" msgstr "用戶" #: src/MainWindow.cpp:1150 msgid "Host" msgstr "主機" #: src/MainWindow.cpp:1183 msgid "State" msgstr "狀態" #: src/MainWindow.cpp:1189 msgid "Task" msgstr "任務" #: src/MainWindow.cpp:1195 msgid "Peer" msgstr "好友" #: src/MainWindow.cpp:1207 msgid "Filename" msgstr "檔案名" #: src/MainWindow.cpp:1219 msgid "Completed" msgstr "已完成" #: src/MainWindow.cpp:1225 msgid "Progress" msgstr "進度" #: src/MainWindow.cpp:1231 msgid "Cost" msgstr "花費時間" #: src/MainWindow.cpp:1237 msgid "Remaining" msgstr "剩餘時間" #: src/MainWindow.cpp:1243 msgid "Rate" msgstr "速率" #: src/MainWindow.cpp:1534 msgid "Open This File" msgstr "打開此文件" #: src/MainWindow.cpp:1540 msgid "Open Containing Folder" msgstr "打開所在的文件夾" #: src/MainWindow.cpp:1546 msgid "Terminate Task" msgstr "終止任務" #: src/MainWindow.cpp:1551 msgid "Terminate All" msgstr "終止所有" #: src/MainWindow.cpp:1556 msgid "Clear Tasklist" msgstr "清理任務" #: src/MainWindow.cpp:1577 msgid "Send Message" msgstr "傳送訊息" #: src/MainWindow.cpp:1611 msgid "Change Info." msgstr "更改資訊" #: src/MainWindow.cpp:1626 msgid "Delete Pal" msgstr "刪除好友" #: src/MainWindow.cpp:1715 #, c-format msgid "Pals Online: %" msgstr "線上好友: %" #: src/MainWindow.cpp:1946 msgid "The file you want to open not exist!" msgstr "" #: src/MainWindow.cpp:1975 msgid "The path you want to open not exist!" msgstr "" #: src/output.cpp:35 msgid "Infomation" msgstr "資訊" #: src/output.cpp:60 msgid "Warning" msgstr "警告" #: src/output.cpp:83 msgid "Error" msgstr "錯誤" #: src/ProgramData.cpp:216 msgid "utf-16" msgstr "big5,gb18030" #: src/ProgramData.cpp:219 msgid "utf-8" msgstr "big5" #: src/RecvFileData.cpp:117 msgid "receive" msgstr "接收" #: src/RecvFileData.cpp:184 #, c-format msgid "Failed to receive the file \"%s\" from %s!" msgstr "接收檔案\"%s\"來自%s失敗!" #: src/RecvFileData.cpp:187 #, c-format msgid "Receive the file \"%s\" from %s successfully!" msgstr "接收檔案\"%s\"來自%s成功!" #: src/RecvFileData.cpp:332 #, c-format msgid "Failed to receive the directory \"%s\" from %s!" msgstr "接收目錄\"%s\"來自%s失敗!" #: src/RecvFileData.cpp:335 #, c-format msgid "Receive the directory \"%s\" from %s successfully!" msgstr "接收目錄\"%s\"來自%s成功!" #: src/RevisePal.cpp:97 msgid "Change Pal's Information" msgstr "更改好友資訊" #: src/RevisePal.cpp:125 msgid "Pal's nickname:" msgstr "好友暱稱:" #: src/RevisePal.cpp:131 msgid "Please input pal's new nickname!" msgstr "請輸入好友的新暱稱!" #: src/RevisePal.cpp:137 msgid "Pal's group name:" msgstr "好友群組名稱:" #: src/RevisePal.cpp:143 msgid "Please input pal's new group name!" msgstr "請輸入好友的新群組名稱!" #: src/RevisePal.cpp:149 msgid "System coding:" msgstr "系統編碼:" #: src/RevisePal.cpp:155 msgid "Be SURE to know what you are doing!" msgstr "你最好明白你到底在做些什麼!" #: src/RevisePal.cpp:161 msgid "Pal's face picture:" msgstr "好友頭像:" #: src/RevisePal.cpp:175 msgid "Be compatible with iptux's protocol (DANGEROUS)" msgstr "相容 iptux 擴展協議(危險)" #: src/SendFileData.cpp:117 msgid "send" msgstr "傳送" #: src/SendFileData.cpp:162 #, c-format msgid "Failed to send the file \"%s\" to %s!" msgstr "傳送檔案\"%s\"到%s失敗!" #: src/SendFileData.cpp:165 #, c-format msgid "Send the file \"%s\" to %s successfully!" msgstr "傳送檔案\"%s\"到%s成功!" #: src/SendFileData.cpp:290 #, c-format msgid "Failed to send the directory \"%s\" to %s!" msgstr "傳送目錄\"%s\"到%s失敗!" #: src/SendFileData.cpp:293 #, c-format msgid "Send the directory \"%s\" to %s successfully!" msgstr "傳送目錄\"%s\"到%s失敗!" #: src/ShareFile.cpp:102 msgid "Shared Files Management" msgstr "共享檔案管理器" #: src/ShareFile.cpp:105 msgid "OK" msgstr "確定" #: src/ShareFile.cpp:106 msgid "Apply" msgstr "套用" #: src/ShareFile.cpp:150 msgid "Add Files" msgstr "新增檔案" #: src/ShareFile.cpp:153 msgid "Add Folders" msgstr "新增目錄" #: src/ShareFile.cpp:156 msgid "Delete Resources" msgstr "刪除資源" #: src/ShareFile.cpp:159 msgid "Clear Password" msgstr "清除密碼" #: src/ShareFile.cpp:162 msgid "Set Password" msgstr "設置密碼" #: src/ShareFile.cpp:220 src/ShareFile.cpp:378 msgid "regular" msgstr "常規檔案" #: src/ShareFile.cpp:224 src/ShareFile.cpp:382 msgid "directory" msgstr "目錄" #: src/ShareFile.cpp:270 msgid "File" msgstr "檔案" #: src/ShareFile.cpp:286 msgid "Type" msgstr "類型" #: src/ShareFile.cpp:422 msgid "Choose the files to share" msgstr "選擇共享檔案" #: src/ShareFile.cpp:425 msgid "Choose the folders to share" msgstr "選擇共享目錄" #: src/SoundSystem.cpp:153 #, c-format msgid "Failed to play the prompt tone, %s\n" msgstr "播放提示音失敗,%s\n" #: src/StatusIcon.cpp:102 src/StatusIcon.cpp:274 #, c-format msgid "To be read: %u messages" msgstr "未讀訊息: %u條" #: src/StatusIcon.cpp:143 msgid "_Hide" msgstr "隱藏(_H)" #: src/StatusIcon.cpp:145 msgid "_Show" msgstr "顯示(_S)" #: src/support.cpp:44 msgid "Loading the process successfully!" msgstr "程序載入成功!" #: src/support.cpp:63 msgid "The process is about to quit!" msgstr "程序即將退出!" #: src/support.cpp:102 #, c-format msgid "iptux: A software for sharing in LAN\n" msgstr "" #: src/support.cpp:103 #, c-format msgid "" "\t-h --help\n" "\t\tdisplay this help and exit\n" msgstr "" #: src/support.cpp:104 #, c-format msgid "" "\t-v --version\n" "\t\toutput version information and exit\n" msgstr "" #: src/support.cpp:120 #, c-format msgid "What do you want to do?\n" msgstr "" #: src/support.cpp:149 msgid "Can't find any available web browser!\n" msgstr "未發現可用的瀏覽器!\n" #: src/support.cpp:179 #, c-format msgid "" "Fatal Error!!\n" "Failed to bind the TCP/UDP port(2425)!\n" "%s" msgstr "" "致命錯誤!!\n" "連接TCP/UDP端口(2425)失敗!\n" "%s" #: src/UdpData.cpp:133 src/UdpData.cpp:134 src/UdpData.cpp:569 #: src/UdpData.cpp:606 msgid "mysterious" msgstr "神秘訪客" #: src/uninstall/utils.cpp:23 msgid "The user is not privileged!\n" msgstr "用戶沒有權限!\n" #: src/uninstall/utils.cpp:34 #, c-format msgid "Opendir() directory \"%s\" failed, %s\n" msgstr "打開目錄\"%s\"失敗,%s\n" #: src/uninstall/utils.cpp:45 #, c-format msgid "Stat() file \"%s\" failed, %s\n" msgstr "查看檔案\"%s\"狀態失敗,%s\n" #: src/uninstall/utils.cpp:51 src/uninstall/utils.cpp:67 #, c-format msgid "Unlink() file \"%s\" failed, %s\n" msgstr "刪除檔案\"%s\"失敗,%s\n" #: src/uninstall/utils.cpp:61 #, c-format msgid "Rmdir() directory \"%s\" failed, %s\n" msgstr "刪除目錄\"%s\"失敗,%s\n" #~ msgid "Pal's Shared Resources" #~ msgstr "好友共享的資源" #~ msgid "Files Receive Management" #~ msgstr "檔案接收管理器" #~ msgid "Recv" #~ msgstr "接收" #~ msgid "Free:%s Total:%s" #~ msgstr "空閒:%s 總計:%s" #~ msgid "Chat History" #~ msgstr "聊天記錄" #~ msgid "Choose enclosure files" #~ msgstr "選擇檔案附件" #~ msgid "Choose enclosure folders" #~ msgstr "選擇目錄附件" #~ msgid "" #~ "\n" #~ "Can't send an empty message!!" #~ msgstr "" #~ "\n" #~ "傳送內容不能為空!!" iptux-0.6.3/protocol000077500000000000000000000064651257720006400144760ustar00rootroot00000000000000一、iptux发送数据编码列表(不全,但很容易推导出其他的): 1、广播 首选编码 2、拨号 首选编码 3、通知在线 好友编码 4、变更信息 好友编码 5、未知拨号 首选编码 6、发送消息 好友编码 7、回应消息 好友编码 …… 好友编码 二、iptux接收数据编码处理(确认,意指已有一方成功建立了好友数据结构) 1、对于iptux尚未确认的好友,发送或接收的编码将一概按照首选编码处理! 2、对于iptux已经确认的好友,将要发送的数据必须一概转换成好友编码后才能发送出去;对于接收到的好友数据,如果好友兼容iptux自身协议,数据直接被使用,否则数据必须被转换为本地编码,方可使用! 三、iptux提高功能协议: 1、iptux期望所接收到的任何好友的第一个数据包或信息更改数据包(IPMSG_BR_ABSENCE)为如下格式: (IPMsg协议标准实现)\0(组名)\0(好友头像名)\0(好友编码) 注:好友头像名为文件名,而不是全路径 如果满足如上条件,则认为兼容iptux,iptux将严格使用好友提供的相关数据;否则不兼容,iptux将使用一些软件默认数据来填充好友的数据结构。 2、自定义命令字实现相关功能如下: /* 命令字 */ #define IPTUX_ASKSHARED 0x000000FFUL 请求获取共享文件 #define IPTUX_SENDICON 0x000000FEUL 发送自定义头像数据 #define IPTUX_SENDSUBLAYER 0x000000FDUL 发送底层数据,必须与选项配合使用 #define IPTUX_SENDSIGN 0x000000FCUL 发送个人签名 #define IPTUX_SENDMSG 0x000000FBUL 发送消息,必须与选项配合使用 /* 命令字选项 */ /* option for IPTUX_SENDSUBLAYER */ #define IPTUX_PHOTOPICOPT 0x00000100UL 个人形象图片选项 #define IPTUX_MSGPICOPT 0x00000200UL 消息图片选项 /* option for IPMSG_SENDMSG */ #define IPTUX_SHAREDOPT 0x80000000UL 共享文件选项 /* option for IPMSG_SENDMSG & IPTUX_ASKSHARED */ #define IPTUX_PASSWDOPT 0x40000000UL 密码选项 /* option for IPTUX_SENDMSG */ #define IPTUX_REGULAROPT 0x00000100UL #define IPTUX_SEGMENTOPT 0x00000200UL #define IPTUX_GROUPOPT 0x00000300UL #define IPTUX_BROADCASTOPT 0x00000400UL 1)当iptux接收到IPTUX_ASKSHARED命令字的数据包时,就应该直接将软件设置的共享文件提供给请求者或是先向使用者(用户)询问; 2)当iptux接收到IPTUX_SENDICON命令字的数据包时,应该提取数据包的图像数据,然后将好友头像转换为此图像;此命令格式如下: (IPMsg协议标准实现)\0(图像数据) 注:图像数据应为存盘文件中的数据,而不是内存数据;另,图像数据不能超过8096字节 iptux期望在接收到此命令数据包之前,此好友必须已经被确认,否则数据将被丢弃;此命令应该紧跟在(IPMSG_BR_ENTRY,IPMSG_ANSENTRY,IPMSG_BR_ABSENCE)命令数据包之后,但是不紧跟在其后也无关要紧,iptux知道怎么正确处理它; 3)IPTUX_SENDSUBLAYER命令字必须配合选项命令字,使用TCP协议发送,命令格式如下: (IPMsg协议标准实现)\0(数据) 4)当iptux接收到IPTUX_SENDSIGN命令字的数据包时,将提取个人签名; 5)当iptux接收到IPTUX_SENDMSG命令字的数据包时,将按照消息选项分派消息最终去向;此命令字主要用于扩展IPMsg的发送消息命令。 iptux-0.6.3/sound/000077500000000000000000000000001257720006400140245ustar00rootroot00000000000000iptux-0.6.3/sound/Makefile.am000077500000000000000000000001501257720006400160570ustar00rootroot00000000000000sound = msg.ogg trans.ogg EXTRA_DIST = $(sound) sounddir = @sounddir@ nobase_dist_sound_DATA = $(sound)iptux-0.6.3/sound/Makefile.in000066400000000000000000000347761257720006400161120ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = sound ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(nobase_dist_sound_DATA) \ $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sounddir)" DATA = $(nobase_dist_sound_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_CFLAGS = @GST_CFLAGS@ GST_LIBS = @GST_LIBS@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ desktopdir = @desktopdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logodir = @logodir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pixmapsdir = @pixmapsdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sounddir = @sounddir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ sound = msg.ogg trans.ogg EXTRA_DIST = $(sound) nobase_dist_sound_DATA = $(sound) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign sound/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign sound/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-nobase_dist_soundDATA: $(nobase_dist_sound_DATA) @$(NORMAL_INSTALL) @list='$(nobase_dist_sound_DATA)'; test -n "$(sounddir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sounddir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sounddir)" || exit 1; \ fi; \ $(am__nobase_list) | while read dir files; do \ xfiles=; for file in $$files; do \ if test -f "$$file"; then xfiles="$$xfiles $$file"; \ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ test -z "$$xfiles" || { \ test "x$$dir" = x. || { \ echo " $(MKDIR_P) '$(DESTDIR)$(sounddir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(sounddir)/$$dir"; }; \ echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(sounddir)/$$dir'"; \ $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(sounddir)/$$dir" || exit $$?; }; \ done uninstall-nobase_dist_soundDATA: @$(NORMAL_UNINSTALL) @list='$(nobase_dist_sound_DATA)'; test -n "$(sounddir)" || list=; \ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ dir='$(DESTDIR)$(sounddir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(sounddir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-nobase_dist_soundDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-nobase_dist_soundDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-nobase_dist_soundDATA \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-nobase_dist_soundDATA .PRECIOUS: Makefile # 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: iptux-0.6.3/sound/msg.ogg000077500000000000000000000224731257720006400153230ustar00rootroot00000000000000OggS-F7vorbisD8OggS-vp-vorbisXiph.Org libVorbis I 20070622vorbis"BCV@$s*FsBPBkBL2L[%s!B[(АU@AxA!%=X'=!9xiA!B!B!E9h'A08 8E9X'A B9!$5HP9,(05(0ԃ BI5gAxiA!$AHAFAX9A*9 4d((  @Qqɑɱ  YHHH$Y%Y%Y扪,˲,˲,2 HPQ Eq Yd8Xh爎4CS# G,]6MuC74ӴmUut]_uhPTU]WeUW}[}UUYՖa} Uum]X~2tu[h뺱̾L(CLABH)R9)sRB)RR9&%sNJ(PJKB)RZl՚Z5Z(PJ[k5FAȜ9'Z(9*:)Z,)X9'%J!JL%C*b,)ZlŘs(ŒJl%X[L9s9'%sNJ(RRksR:)eJ*)XJJ1sNJ!BJ%SJRb+)XJjŘsK1PR%KJ1snAh-c(%cC)b,)cŘs(%ƒJ%X[sNZkmsЩZSLsYsZ(PJZ[9Rb+)XJŘskPJ%XKJ5k5ZŘkjs1Sk5kNZsc&BCVQ!J1A141朔1 R1R2 RRR RkRRj4%(4d% `pA'@pBdH4,1$&(@Et.:B H 7<'RpFGHH!DD4OggS@F-<="**+"! !0//'1-*./*%0*+.-#"$#*++&"!"#$*--%&.,.˵ĺ^ T̩Fw<.r"+"2_ leQ2c?{{-Xߝtn ӰsN= B5Amg4Tqed-w=G$쳘ʟGv9&Ű|VYYc׼WdOfgfTVy@,7P+uI<|F5)[-Ndo^7)-Hl0 |DO#"@M-o )M|Dՙ]'vQ_vav<#5g*¡I>Q`8ggSOۙY3w oCLW#_+c! `},.n\rpZY6?֕HD]K@i#)B [Q|Fu«lx8IfPT[lk s9[ *d^ 5E;loۨ'hY \G'0:LkX< LS n rC,EA:tM]?uۂUgNzΤIDWrcQu0`ooY8myyyyyELubT7U6Y7@F*Hѥ? zw#nJh`I!SMsd4Y5|eWx?o9apT˜ \[?v{ߊ^G\]=qu{g>agSNZXT>+ 턠4i\W%wzS>sߕO߯"XԵ_s8_ n ;zj:h8w)! a^(Zq+j:xFe ^gIU跢<,Q֠e(ƞЏ@[~ќyoZHnu!Ь<@V d _?F8v2 ~&@ w88)vaogd9lfu"컜dY$4KTJ+!$(qTMҨs,a8j;XyK.a^ҷ:׭݉I_|5[M YIVy?7V ?^Ih)P {`c\WޯWZ EcCfQ8<|TaGTW!4e#Ax%n[ !\iE_d)xתpd[伺V]F\ ™>4 M-nlȩ.s( vo52+R_!FWvL4]oR供+ @0YI÷f0 ,<:y%1>G#{0@q$8^*}g&nP/Fhv;?dFVم_>zon!ВL"=.v͝!;Z2 0sT`'/5p$a+b09윒(Q=[3A  ؔFP$jVKVlBIJ-<[d ]u߹WUG@3U+񢡊iT[wdђ_Ȥta!I8߮st ·`r In&ˤ{/"b J~  A9!ҽB*-P9ѡwh䎯[$v!b(2i+ Br;pVO2Vأ(@3R/I-I4_q&4"(c53<7빾9;+/6h av5sq<4+im7H2";Y/Xk.Fq5H;~a% .%u6J'ٓA4PW700L.}'Tg狋Md&LfDyq@zNC[2oӈzozevMkD rGk{Q~Z?n/yچbOn0kc75n 5Q &Q.azh!=9ȢdO{T]7xȢtjAse?50f8s(0(2CġmM7")84 /G|N#'s٫f|ڥhp|,`fPCgod#zk1+{M t/(OggSo-K U޷w{oO9#2 yoƛ87㣱Wv֌t IgzÈasUA{&PWO[kޥdn"-L{&gf{u(dd צv͍FQ &2K~"gr܉ןD2$xgoK&!ϝ,lְda$>$=̧k1Ȑ4ğ>EvDx7%aBQmG'9`,w6x66*BP9WA$Ha2%Efcfw*PJrC C=]`%|rnmPN9̊SQV1n4L="622;T"lem^vgϔ=Pr{f'3$K.Z)/m?5dX$=)ol 0*s\q< #P@*v?!SZ9מN"P2aֵ6w#De|#ιW_-1iȀĨ&OO2]e|Pf1~xh{{{w_HxL'Ah,:wݑziAdHM?eSg! 71`̏+D98V@㵂H6#XX2ʑ.WcZ7/&¬sh&!Ye|R:&I>So Lj)q2*X/g9E=b'y7¸e^wL )aW8?`شX%pjLT\b01IlmJ SE߈:i]F}S4ͶP13*M D929M[·  '*vP$t $np`ѻau,q3o.wocՊຢOGw_ 5^NsMw{ݡ$i}G.t@:֊Q췧3a\fuQw[uU5S="EJGUdm:+,/@ZϸkR7zf"cǜ/4%9mېTjfx p4GD}'rVώfeuox/3 Is-Wg#醄a?j f LcPXsyCxzr˜QbwhCf3:.9Xu܏ߞ| >8D-]Ɔڎ}njJR`Ly>8_g.J?+g_~ IHWE#+b-9N?()7zNޕ|zܶd83B3@gPP aMj~cvqNߌ(r\\vY} iptux-0.6.3/sound/trans.ogg000077500000000000000000000071761257720006400156670ustar00rootroot00000000000000OggS`(RtvorbisOggS`(Rv -vorbisXiph.Org libVorbis I 20070622vorbisBCV R!%SJcRR)cP[Gc9F!dSI{O*XJRX)ESLSIR)EcSH!S1esKI %lMtKc1FcZJc1EcRRIs:f%d:Fb|0:B(R-[S-KiasJjc1S(АU@BCV P EQАU@EqqG$BCV@((#IdYeYy/.!I̐SI&)U99dRƘbQΐS 11)N9 "CHd K=b8"A!Ɛs J!rI D9)LJ(I -"眔NJ&RˤB+8XRH)ĔbN1R)ǐR9Řr1 T1H)sN9 d * 2B!+8$iihi(z(y陦zlyiz)k늪j˦ڶ骶ʲn۞ʶnml,ۺyꙦz麪ڲ꺲홦늪+ۦʲʶʲk麢ڮʮmʺʲ۶ 躶ʮ-lBT3MLuU׵mum[3M5]WEueՕu]ue[LuMWeUeYeveWE׵mU}]ue_meY}uu[eWeYe]Y}SU[7]WM}[}am]WUօUu}eu0,뾮00m ëƱ뾮ܾj۾1nƱm+loq,ʾo/ *˺ڲ˺. jںp̲. +ǯ Cնuo 7v@!+8!c* R !T1!cJJI!* dIJhJ(PJKRj-Z JiZj)Rlc2dI(VJi)sLJƠB*JIeIɠ9HRIPJkJJJmJi-ZIRmZ# dAɜRJIZ朔:*J)RA(%JIJ+JJRZk՘RK5ZIPJkS+5PR JiVkj-PBkK*1cmJi[)[XSK5blJ-9ZkJ-R[LXk %JiZJZJ*ZlZ5b))JlX[l5blXR1XsKՔZXK+5kn5R@ eА@` cAhr9)R9'%sB)eA!99B))[(%Z, M Y D ( c*sBcAsA)cA'%B)B( lДXА@` b 1 tR:)LJ'Z )eJ%ZH 2k%bFXb*B(4d%@c9gb9!41*ƜsBc9!9 BsBBA!RJ B)tBR *pQdsBCVy1J9'%F) [cRjb BJX1!b ZvRj-ZCJXk!b5Z{j-ZsιE6' *4d%@ c9b1CJ1Ƙs)s9c9s1s9Ƙs9s9砃9sAs9!t9 *pQdsBCV1RJ)RJRJ)R!RJ)RJ)RJ)RJ)RJ)RJ)RJ)RJ)RJ)RJ)RJ)RJ)RJ)RJ)RJ)RJ)RJ)RJ)RJ)RJ)RJ)RJ)RJ)RJ) gXI:+ .4d%9'%1tNJI%5A(sRJ)ZjRJb !Z Vk)R()KJ2$ZK9ZjBJRkuRRIZm-Zk-bl%ZkZL[K-bKb1 npHqBCV!2J9眃B!R1砃B!DJ1會B!1 B1B!R: PJ RJBRJ !B(RJ)!J)RJ)%B(RJ)B(RJ)B(RJ)BRJ)RBRJ)RJ(!RJ)RJ %RJ)RJ)!RJ)RJ)#$"l4LQH h  "$OggS`(RëZM=97699:899GR?Kj U.>?$Sڈ;yw~wަFRH M4\Zh4ަv.;쌢%C&@xt-m2a+fe5/Xd-; _ R,@xވUw֙ml%)x%:Q0iRo~%.-N8Ӡ jVM,`T V l[{&+@` ǁya_H*?; 'x)0WŸGJ~ bI,EP56K@+A)+@ё3(UՎSxLy }>^ 4K xoBQt%U|6fr-`XGi]v 6x*CID34 q% I g-jg_,UW<P4έ:_u'{*(C!, \~J%h%W +bĴ?Ͽ@D@ݕ=G,OKАLDm*nw <I;:,Dm*D W<jp_7#_yoCjNVR*FKn^r ^%%`\:Pr%ٖ[.çZ 51$ͻ^L|8'ٕ dgٕ d PɷjzDBH!ì iDu. BsԥoN`.&L$?cqV Ϯ:D氕?m(yy1sXt ٱ!(؀#s`l-dWd!=0?8qqq'を 1- u9 ;iptux-0.6.3/src/000077500000000000000000000000001257720006400134635ustar00rootroot00000000000000iptux-0.6.3/src/AnalogFS.cpp000077500000000000000000000144101257720006400156240ustar00rootroot00000000000000// // C++ Implementation: AnalogFS // // Description: // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #include "AnalogFS.h" #include "output.h" #include "utils.h" /** * 类构造函数. */ AnalogFS::AnalogFS() { if (!::getcwd(path, MAX_PATHLEN)) strcpy(path, "/"); } /** * 类析构函数. */ AnalogFS::~AnalogFS() { } /** * 更改当前工作目录. * @param dir 目录路径 * @return 成功与否 */ int AnalogFS::chdir(const char *dir) { size_t len; char *ptr; if (strcmp(dir, ".") == 0) return 0; if (*dir != '/') { if (strcmp(dir, "..") == 0) { ptr = strrchr(path, '/'); if (ptr != path) *ptr = '\0'; } else { len = strlen(path); ptr = (char *)(*(path + 1) != '\0' ? "/" : ""); snprintf(path + len, MAX_PATHLEN - len, "%s%s", ptr, dir); } } else snprintf(path, MAX_PATHLEN, "%s", dir); return 0; } int AnalogFS::open(const char *fn, int flags) { return open(fn, flags, 0); } /** * 打开文件. * @param fn 文件路径 * @param flags as in open() * @param ... as in open() * @return 文件描述符 */ int AnalogFS::open(const char *fn, int flags, mode_t mode) { char tpath[MAX_PATHLEN]; char *tfn; int fd; strcpy(tpath, path); mergepath(tpath, fn); if ((flags & O_ACCMODE) == O_WRONLY) { tfn = assert_filename_inexist(tpath); if ((fd = ::open(tfn, flags, mode)) == -1) pwarning(_("Open() file \"%s\" failed, %s"), tfn, strerror(errno)); g_free(tfn); } else { if ((fd = ::open(tpath, flags, mode)) == -1) pwarning(_("Open() file \"%s\" failed, %s"), tpath, strerror(errno)); } return fd; } /** * 获取文件状态. * @param fn 文件路径 * @param st a stat64 struct * @return 成功与否 */ int AnalogFS::stat(const char *fn, struct stat64 *st) { char tpath[MAX_PATHLEN]; int result; strcpy(tpath, path); mergepath(tpath, fn); if ((result = ::stat64(tpath, st)) != 0) pwarning(_("Stat64() file \"%s\" failed, %s"), tpath, strerror(errno)); return result; } /** * 创建新的目录. * @param dir 目录路径 * @param mode as in mkdir() * @return 成功与否 */ int AnalogFS::mkdir(const char *dir, mode_t mode) { char tpath[MAX_PATHLEN]; int result; strcpy(tpath, path); mergepath(tpath, dir); if (::access(tpath, F_OK) == 0) return 0; if ((result = ::mkdir(tpath, mode)) != 0) pwarning(_("Mkdir() directory \"%s\" failed, %s"), tpath, strerror(errno)); return result; } /** * 获取目录总大小. * @param dir_name 目录路径 * @return 目录大小 */ int64_t AnalogFS::ftwsize(const char *dir_name) { // 由于系统中存在使用此方法读取文件的大小的调用,因此需要判断文件dir_name是文件还是目录 struct stat64 st ; int result = stat(dir_name, &st); if (result != 0) { // 判断文件类型失败,直接返回0 pwarning(_("stat file \"%s\" failed: %s"), dir_name, strerror(errno)); return 0; } // 不是文件,也不是目录,直接返回 if (!(S_ISREG(st.st_mode)) && !(S_ISDIR(st.st_mode))) return 0; // 文件 if (S_ISREG(st.st_mode)) return st.st_size; // 到了这里就一定是目录了 DIR* dir = opendir(dir_name); if(dir == NULL) { pwarning(_("opendir on \"%s\" failed: %s"), dir_name, strerror(errno)); return 0; } struct dirent *dirt; int64_t sumsize = 0; while(dirt = readdir(dir)) { if(strcmp(dirt->d_name, ".") == 0) { continue; } if(strcmp(dirt->d_name, "..") == 0) { continue; } char tpath[MAX_PATHLEN]; strcpy(tpath, dir_name); mergepath(tpath, dirt->d_name); struct stat64 st; if(stat64(tpath, &st) == -1) { continue; } if(S_ISDIR(st.st_mode)) { sumsize += ftwsize(tpath); } else if(S_ISREG(st.st_mode)) { sumsize += st.st_size; } else { // ignore other files } } return sumsize; } /** * 打开目录. * @param dir 目录路径 * @return DIR */ DIR *AnalogFS::opendir(const char *dir) { char tpath[MAX_PATHLEN]; DIR *dirs; strcpy(tpath, path); mergepath(tpath, dir); if (!(dirs = ::opendir(tpath))) pwarning(_("Opendir() directory \"%s\" failed, %s"), tpath, strerror(errno)); return dirs; } /** * 合并路径. * @param tpath[] 基路径 * @param npath 需要被合并的路径 * @return 成功与否 */ int AnalogFS::mergepath(char tpath[], const char *npath) { size_t len; char *ptr; if (strcmp(npath, ".") == 0) return 0; if (*npath != '/') { if (strcmp(npath, "..") == 0) { ptr = strrchr(tpath, '/'); if (ptr != tpath) *ptr = '\0'; } else { len = strlen(tpath); ptr = (char *)(*(tpath + 1) != '\0' ? "/" : ""); snprintf(tpath + len, MAX_PATHLEN - len, "%s%s", ptr, npath); } } else snprintf(tpath, MAX_PATHLEN, "%s", npath); return 0; } iptux-0.6.3/src/AnalogFS.h000077500000000000000000000017201257720006400152710ustar00rootroot00000000000000// // C++ Interface: AnalogFS // // Description: // 虚拟文件系统,接口函数使用方法尽量与库函数相同 // 意义在于使用此类操作文件可保证多线程安全 // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef ANALOGFS_H #define ANALOGFS_H #include "mess.h" class AnalogFS { public: AnalogFS(); ~AnalogFS(); int chdir(const char *dir); int open(const char *fn, int flags); int open(const char *fn, int flags, mode_t mode); int stat(const char *fn, struct stat64 *st); int mkdir(const char *dir, mode_t mode); int64_t ftwsize(const char *dir); DIR *opendir(const char *dir); private: int mergepath(char tpath[], const char *npath); char path[MAX_PATHLEN]; //当前工作路径 public: inline char* cwd() { return path; } }; #endif iptux-0.6.3/src/Command.cpp000077500000000000000000000442541257720006400155610ustar00rootroot00000000000000// // C++ Implementation: Command // // Description: // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #include "Command.h" #include "ProgramData.h" #include "CoreThread.h" #include "wrapper.h" #include "support.h" #include "utils.h" extern ProgramData progdt; extern CoreThread cthrd; uint32_t Command::packetn = 1; /** * 类构造函数. */ Command::Command():size(0) { } /** * 类析构函数. */ Command::~Command() { } /** * 向局域网所有计算机广播上线信息. * @param sock udp socket */ void Command::BroadCast(int sock) { struct sockaddr_in addr; GSList *list, *tlist; CreateCommand(IPMSG_ABSENCEOPT | IPMSG_BR_ENTRY, progdt.nickname); ConvertEncode(progdt.encode); CreateIptuxExtra(progdt.encode); bzero(&addr, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(IPTUX_DEFAULT_PORT); tlist = list = get_sys_broadcast_addr(sock); while (tlist) { addr.sin_addr.s_addr = GPOINTER_TO_UINT(tlist->data); sendto(sock, buf, size, 0, (struct sockaddr *)&addr, sizeof(addr)); g_usleep(9999); tlist = g_slist_next(tlist); } g_slist_free(list); } /** * 向局域网某些计算机单独发送上线信息. * @param sock udp socket */ void Command::DialUp(int sock) { struct sockaddr_in addr; in_addr_t startip, endip, ipv4; NetSegment *pns; GSList *list, *tlist; CreateCommand(IPMSG_DIALUPOPT | IPMSG_ABSENCEOPT | IPMSG_BR_ENTRY, progdt.nickname); ConvertEncode(progdt.encode); CreateIptuxExtra(progdt.encode); bzero(&addr, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(IPTUX_DEFAULT_PORT); //与某些代码片段的获取网段描述相冲突,必须复制出来使用 pthread_mutex_lock(&progdt.mutex); list = progdt.CopyNetSegment(); pthread_mutex_unlock(&progdt.mutex); tlist = list; while (tlist) { pns = (NetSegment *)tlist->data; inet_pton(AF_INET, pns->startip, &startip); startip = ntohl(startip); inet_pton(AF_INET, pns->endip, &endip); endip = ntohl(endip); ipv4_order(&startip, &endip); ipv4 = startip; while (ipv4 <= endip) { addr.sin_addr.s_addr = htonl(ipv4); sendto(sock, buf, size, 0, (struct sockaddr *)&addr, sizeof(addr)); g_usleep(999); ipv4++; } tlist = g_slist_next(tlist); } for (tlist = list; tlist; tlist = g_slist_next(tlist)) delete (NetSegment *)tlist->data; g_slist_free(list); } /** * 回复好友本人在线. * @param sock udp socket * @param pal class PalInfo */ void Command::SendAnsentry(int sock, PalInfo *pal) { struct sockaddr_in addr; CreateCommand(IPMSG_ABSENCEOPT | IPMSG_ANSENTRY, progdt.nickname); ConvertEncode(pal->encode); CreateIptuxExtra(pal->encode); bzero(&addr, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(IPTUX_DEFAULT_PORT); addr.sin_addr.s_addr = pal->ipv4; sendto(sock, buf, size, 0, (struct sockaddr *)&addr, sizeof(addr)); } /** * 通告好友本人下线. * @param sock udp socket * @param pal class PalInfo */ void Command::SendExit(int sock, PalInfo *pal) { struct sockaddr_in addr; CreateCommand(IPMSG_DIALUPOPT | IPMSG_BR_EXIT, NULL); ConvertEncode(pal->encode); bzero(&addr, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(IPTUX_DEFAULT_PORT); addr.sin_addr.s_addr = pal->ipv4; sendto(sock, buf, size, 0, (struct sockaddr *)&addr, sizeof(addr)); } /** * 通告好友本人个人信息已变. * @param sock udp socket * @param pal class PalInfo */ void Command::SendAbsence(int sock, PalInfo *pal) { struct sockaddr_in addr; CreateCommand(IPMSG_ABSENCEOPT | IPMSG_BR_ABSENCE, progdt.nickname); ConvertEncode(pal->encode); CreateIptuxExtra(pal->encode); bzero(&addr, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(IPTUX_DEFAULT_PORT); addr.sin_addr.s_addr = pal->ipv4; sendto(sock, buf, size, 0, (struct sockaddr *)&addr, sizeof(addr)); } /** * 尝试着给某计算机发送一个上线信息数据包. * @param sock udp socket * @param ipv4 ipv4 address */ void Command::SendDetectPacket(int sock, in_addr_t ipv4) { struct sockaddr_in addr; CreateCommand(IPMSG_DIALUPOPT | IPMSG_ABSENCEOPT | IPMSG_BR_ENTRY, progdt.nickname); ConvertEncode(progdt.encode); CreateIptuxExtra(progdt.encode); bzero(&addr, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(IPTUX_DEFAULT_PORT); addr.sin_addr.s_addr = ipv4; sendto(sock, buf, size, 0, (struct sockaddr *)&addr, sizeof(addr)); } /** * 给好友发送消息. * @param sock udp socket * @param pal class PalInfo * @param msg 消息数据 */ void Command::SendMessage(int sock, PalInfo *pal, const char *msg) { struct sockaddr_in addr; uint32_t packetno; uint8_t count; pal->rpacketn = packetno = packetn; //此数据包需要检验回复 CreateCommand(IPMSG_SENDCHECKOPT | IPMSG_SENDMSG, msg); ConvertEncode(pal->encode); bzero(&addr, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(IPTUX_DEFAULT_PORT); addr.sin_addr.s_addr = pal->ipv4; count = 0; do { sendto(sock, buf, size, 0, (struct sockaddr *)&addr, sizeof(addr)); g_usleep(1000000); count++; } while (pal->rpacketn == packetno && count < MAX_RETRYTIMES); if (pal->rpacketn == packetno) FeedbackError(pal, GROUP_BELONG_TYPE_REGULAR, _("Your pal didn't receive the packet. " "He or she is offline maybe.")); } /** * 回复已收到消息. * @param sock udp socket * @param pal class PalInfo * @param packetno 好友消息的包编号 */ void Command::SendReply(int sock, PalInfo *pal, uint32_t packetno) { char packetstr[11]; //10 +1 =11 struct sockaddr_in addr; snprintf(packetstr, 11, "%" PRIu32, packetno); CreateCommand(IPMSG_SENDCHECKOPT | IPMSG_RECVMSG, packetstr); ConvertEncode(pal->encode); bzero(&addr, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(IPTUX_DEFAULT_PORT); addr.sin_addr.s_addr = pal->ipv4; sendto(sock, buf, size, 0, (struct sockaddr *)&addr, sizeof(addr)); } /** * 群发消息(被其他函数调用). * @param sock udp socket * @param pal class PalInfo * @param msg 消息数据 */ void Command::SendGroupMsg(int sock, PalInfo *pal, const char *msg) { struct sockaddr_in addr; CreateCommand(IPMSG_BROADCASTOPT | IPMSG_SENDMSG, msg); ConvertEncode(pal->encode); bzero(&addr, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(IPTUX_DEFAULT_PORT); addr.sin_addr.s_addr = pal->ipv4; sendto(sock, buf, size, 0, (struct sockaddr *)&addr, sizeof(addr)); } /** * 发送群组消息(被其他函数调用). * @param sock udp socket * @param pal class PalInfo * @param opttype 命令额外选项 * @param msg 消息数据 */ void Command::SendUnitMsg(int sock, PalInfo *pal, uint32_t opttype, const char *msg) { struct sockaddr_in addr; CreateCommand(opttype | IPTUX_SENDMSG, msg); ConvertEncode(pal->encode); bzero(&addr, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(IPTUX_DEFAULT_PORT); addr.sin_addr.s_addr = pal->ipv4; sendto(sock, buf, size, 0, (struct sockaddr *)&addr, sizeof(addr)); } /** * 向好友请求文件数据. * @param sock tcp socket * @param pal class PalInfo * @param packetno 好友消息的包编号 * @param fileid 文件ID标识 * @param offset 文件偏移量 * @return 消息发送成功与否 */ bool Command::SendAskData(int sock, PalInfo *pal, uint32_t packetno, uint32_t fileid, int64_t offset) { char attrstr[35]; //8+1+8+1+16 +1 =35 struct sockaddr_in addr; char *iptuxstr = "iptux"; snprintf(attrstr, 35, "%" PRIx32 ":%" PRIx32 ":%" PRIx64, packetno, fileid, offset); //IPMSG和Feiq的命令字段都是只有IPMSG_GETFILEDATA,使用(IPMSG_FILEATTACHOPT | IPMSG_GETFILEDATA) //会产生一些潜在的不兼容问题,所以在发往非iptux时只使用IPMSG_GETFILEDATA if(strstr(pal->version,iptuxstr)) CreateCommand(IPMSG_FILEATTACHOPT | IPMSG_GETFILEDATA, attrstr); else CreateCommand(IPMSG_GETFILEDATA, attrstr); ConvertEncode(pal->encode); bzero(&addr, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(IPTUX_DEFAULT_PORT); addr.sin_addr.s_addr = pal->ipv4; if (((connect(sock, (struct sockaddr *)&addr, sizeof(addr)) == -1) && (errno != EINTR)) || (xwrite(sock, buf, size) == -1)) return false; return true; } /** * 向好友请求目录文件. * @param sock tcp socket * @param pal class PalInfo * @param packetno 好友消息的包编号 * @param fileid 文件ID标识 * @return 消息发送成功与否 */ bool Command::SendAskFiles(int sock, PalInfo *pal, uint32_t packetno, uint32_t fileid) { char attrstr[20]; //8+1+8+1+1 +1 =20 struct sockaddr_in addr; snprintf(attrstr, 20, "%" PRIx32 ":%" PRIx32 ":0", packetno, fileid); //兼容LanQQ软件 CreateCommand(IPMSG_FILEATTACHOPT | IPMSG_GETDIRFILES, attrstr); ConvertEncode(pal->encode); bzero(&addr, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(IPTUX_DEFAULT_PORT); addr.sin_addr.s_addr = pal->ipv4; if (((connect(sock, (struct sockaddr *)&addr, sizeof(addr)) == -1) && (errno != EINTR)) || (xwrite(sock, buf, size) == -1)) return false; return true; } /** * 向好友请求共享文件信息. * @param sock udp socket * @param pal class PalInfo * @param opttype 命令额外选项 * @param attach 附加数据,即密码 */ void Command::SendAskShared(int sock, PalInfo *pal, uint32_t opttype, const char *attach) { struct sockaddr_in addr; CreateCommand(opttype | IPTUX_ASKSHARED, attach); ConvertEncode(pal->encode); bzero(&addr, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(IPTUX_DEFAULT_PORT); addr.sin_addr.s_addr = pal->ipv4; sendto(sock, buf, size, 0, (struct sockaddr *)&addr, sizeof(addr)); } /** * 向好友发送文件信息. * @param sock udp socket * @param pal class PalInfo * @param opttype 命令额外选项 * @param extra 扩展数据,即文件信息 */ void Command::SendFileInfo(int sock, PalInfo *pal, uint32_t opttype, const char *extra) { struct sockaddr_in addr; CreateCommand(opttype | IPMSG_FILEATTACHOPT | IPMSG_SENDMSG, NULL); ConvertEncode(pal->encode); CreateIpmsgExtra(extra, pal->encode); bzero(&addr, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(IPTUX_DEFAULT_PORT); addr.sin_addr.s_addr = pal->ipv4; sendto(sock, buf, size, 0, (struct sockaddr *)&addr, sizeof(addr)); } /** * 发送本人的头像数据. * @param sock udp socket * @param pal class PalInfo */ void Command::SendMyIcon(int sock, PalInfo *pal) { struct sockaddr_in addr; CreateCommand(IPTUX_SENDICON, NULL); ConvertEncode(pal->encode); CreateIconExtra(); bzero(&addr, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(IPTUX_DEFAULT_PORT); addr.sin_addr.s_addr = pal->ipv4; sendto(sock, buf, size, 0, (struct sockaddr *)&addr, sizeof(addr)); } /** * 发送本人的签名信息. * @param sock udp socket * @param pal class PalInfo */ void Command::SendMySign(int sock, PalInfo *pal) { struct sockaddr_in addr; CreateCommand(IPTUX_SENDSIGN, progdt.sign); ConvertEncode(pal->encode); bzero(&addr, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(IPTUX_DEFAULT_PORT); addr.sin_addr.s_addr = pal->ipv4; sendto(sock, buf, size, 0, (struct sockaddr *)&addr, sizeof(addr)); } /** * 发送底层数据(即发送为最终用户所不能察觉的文件数据). * @param sock tcp socket * @param pal class PalInfo * @param opttype 命令额外选项 * @param path 文件路径 */ void Command::SendSublayer(int sock, PalInfo *pal, uint32_t opttype, const char *path) { struct sockaddr_in addr; int fd; CreateCommand(opttype | IPTUX_SENDSUBLAYER, NULL); ConvertEncode(pal->encode); bzero(&addr, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(IPTUX_DEFAULT_PORT); addr.sin_addr.s_addr = pal->ipv4; if (((connect(sock, (struct sockaddr *)&addr, sizeof(addr)) == -1) && (errno != EINTR)) || (xwrite(sock, buf, size) == -1) || ((fd = open(path, O_RDONLY)) == -1)) return; SendSublayerData(sock, fd); close(fd); } /** * 回馈错误消息. * @param pal class PalInfo * @param btype 消息归属类型 * @param error 错误串 */ void Command::FeedbackError(PalInfo *pal, GroupBelongType btype, const char *error) { MsgPara para; ChipData *chip; /* 构建消息封装包 */ para.pal = pal; para.stype = MESSAGE_SOURCE_TYPE_ERROR; para.btype = btype; chip = new ChipData; chip->type = MESSAGE_CONTENT_TYPE_STRING; chip->data = g_strdup(error); para.dtlist = g_slist_append(NULL, chip); /* 交给某人处理吧 */ cthrd.InsertMessage(¶); } /** * 将文件描述符数据写入网络套接口. * @param sock tcp socket * @param fd file descriptor */ void Command::SendSublayerData(int sock, int fd) { ssize_t len; do { if ((len = xread(fd, buf, MAX_UDPLEN)) <= 0) break; if ((len = xwrite(sock, buf, len)) <= 0) break; } while (1); } /** * 将缓冲区中的字符串转换为指定的编码. * @param encode 字符集编码 */ void Command::ConvertEncode(const char *encode) { char *ptr; if (encode && strcasecmp(encode, "utf-8") != 0 && (ptr = convert_encode(buf, encode, "utf-8"))) { size = strlen(ptr) + 1; memcpy(buf, ptr, size); g_free(ptr); } } /** * 创建命令数据. * @param command 命令字 * @param attach 附加数据 */ void Command::CreateCommand(uint32_t command, const char *attach) { const gchar *env; char *ptr; snprintf(buf, MAX_UDPLEN, "%s", IPTUX_VERSION); size = strlen(buf); ptr = buf + size; snprintf(ptr, MAX_UDPLEN - size, ":%" PRIu32, packetn); packetn++; size += strlen(ptr); ptr = buf + size; env = g_get_user_name(); snprintf(ptr, MAX_UDPLEN - size, ":%s", env); size += strlen(ptr); ptr = buf + size; env = g_get_host_name(); snprintf(ptr, MAX_UDPLEN - size, ":%s", env); size += strlen(ptr); ptr = buf + size; if(command == IPMSG_GETFILEDATA) snprintf(ptr, MAX_UDPLEN - size, ":%d", command); else snprintf(ptr, MAX_UDPLEN - size, ":%" PRIu32, command); size += strlen(ptr); ptr = buf + size; snprintf(ptr, MAX_UDPLEN - size, ":%s", attach ? attach : ""); size += strlen(ptr) + 1; } /** * 创建ipmsg的扩展数据(即文件信息). * @param extra 扩展数据 * @param encode 字符集编码 */ void Command::CreateIpmsgExtra(const char *extra, const char *encode) { char *pptr, *ptr; pptr = buf + size; if (encode && strcasecmp(encode, "utf-8") != 0 && (ptr = convert_encode(extra, encode, "utf-8"))) { snprintf(pptr, MAX_UDPLEN - size, "%s", ptr); g_free(ptr); } else snprintf(pptr, MAX_UDPLEN - size, "%s", extra); if ( (ptr = strrchr(pptr, '\a'))) *(ptr + 1) = '\0'; size += strlen(pptr) + 1; } /** * 创建iptux程序独有的扩展数据. * @param encode 字符集编码 */ void Command::CreateIptuxExtra(const char *encode) { char *pptr, *ptr; pptr = buf + size; if (encode && strcasecmp(encode, "utf-8") != 0 && (ptr = convert_encode(progdt.mygroup, encode, "utf-8"))) { snprintf(pptr, MAX_UDPLEN - size, "%s", ptr); g_free(ptr); } else snprintf(pptr, MAX_UDPLEN - size, "%s", progdt.mygroup); size += strlen(pptr) + 1; pptr = buf + size; snprintf(pptr, MAX_UDPLEN - size, "%s", progdt.myicon); size += strlen(pptr) + 1; pptr = buf + size; snprintf(pptr, MAX_UDPLEN - size, "utf-8"); size += strlen(pptr) + 1; } /** * 创建个人头像的扩展数据. */ void Command::CreateIconExtra() { const gchar *env; char path[MAX_PATHLEN]; ssize_t len; int fd; env = g_get_user_config_dir(); snprintf(path, MAX_PATHLEN, "%s" ICON_PATH "/my-icon", env); if ((fd = open(path, O_RDONLY)) == -1) return; len = xread(fd, buf + size, MAX_UDPLEN - size); close(fd); if (len != -1) size += len; } iptux-0.6.3/src/Command.h000077500000000000000000000041671257720006400152250ustar00rootroot00000000000000// // C++ Interface: Command // // Description: // 创建命令并发送 // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef COMMAND_H #define COMMAND_H #include "mess.h" class Command { public: Command(); ~Command(); void BroadCast(int sock); void DialUp(int sock); void SendAnsentry(int sock, PalInfo *pal); void SendExit(int sock, PalInfo *pal); void SendAbsence(int sock, PalInfo *pal); void SendDetectPacket(int sock, in_addr_t ipv4); void SendMessage(int sock, PalInfo *pal, const char *msg); void SendReply(int sock, PalInfo *pal, uint32_t packetno); void SendGroupMsg(int sock, PalInfo *pal, const char *msg); void SendUnitMsg(int sock, PalInfo *pal, uint32_t opttype, const char *msg); bool SendAskData(int sock, PalInfo *pal, uint32_t packetno, uint32_t fileid, int64_t offset); bool SendAskFiles(int sock, PalInfo *pal, uint32_t packetno, uint32_t fileid); void SendAskShared(int sock, PalInfo *pal, uint32_t opttype, const char *attach); void SendFileInfo(int sock, PalInfo *pal, uint32_t opttype, const char *extra); void SendMyIcon(int sock, PalInfo *pal); void SendMySign(int sock, PalInfo *pal); void SendSublayer(int sock, PalInfo *pal, uint32_t opttype, const char *path); private: void FeedbackError(PalInfo *pal, GroupBelongType btype, const char *error); void SendSublayerData(int sock, int fd); void ConvertEncode(const char *encode); void CreateCommand(uint32_t command, const char *attach); void CreateIpmsgExtra(const char *extra, const char *encode); void CreateIptuxExtra(const char *encode); void CreateIconExtra(); size_t size; //当前已使用缓冲区的长度 char buf[MAX_UDPLEN]; //数据缓冲区 static uint32_t packetn; //包编号 public: inline uint32_t &Packetn() { return packetn; } }; #endif iptux-0.6.3/src/CoreThread.cpp000077500000000000000000001202401257720006400162110ustar00rootroot00000000000000// // C++ Implementation: CoreThread // // Description: // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #include "CoreThread.h" #include "ProgramData.h" #include "MainWindow.h" #include "LogSystem.h" #include "UdpData.h" #include "TcpData.h" #include "Command.h" #include "output.h" #include "support.h" #include "utils.h" extern ProgramData progdt; extern CoreThread cthrd; extern MainWindow mwin; extern LogSystem lgsys; /** * 类构造函数. */ CoreThread::CoreThread():tcpsock(-1), udpsock(-1), server(true), pallist(NULL), rgllist(NULL), sgmlist(NULL), grplist(NULL), brdlist(NULL), blacklist(NULL), pbn(1), prn(MAX_SHAREDFILE), pblist(NULL), prlist(NULL), ecsList(NULL),passwd(NULL) { g_queue_init(&msgline); pthread_mutex_init(&mutex, NULL); } /** * 类析构函数. */ CoreThread::~CoreThread() { ClearSublayer(); } /** * 程序核心入口,主要任务服务将在此开启. */ void CoreThread::CoreThreadEntry() { pthread_t pid; /* 初始化底层数据 */ InitSublayer(); /* 开启UDP监听服务 */ pthread_create(&pid, NULL, ThreadFunc(RecvUdpData), this); pthread_detach(pid); /* 开启TCP监听服务 */ pthread_create(&pid, NULL, ThreadFunc(RecvTcpData), this); pthread_detach(pid); /* 定时扫描处理程序内部任务 */ timerid = gdk_threads_add_timeout(500, GSourceFunc(WatchCoreStatus), this); /* 通知所有计算机本大爷上线啦 */ pthread_create(&pid, NULL, ThreadFunc(SendNotifyToAll), this); } /** * 写出共享文件数据. * @note 与可能修改链表的代码段串行执行,没有加锁的必要 */ void CoreThread::WriteSharedData() { GConfClient *client; GSList *list, *tlist; list = NULL; /* 获取共享文件链表 */ tlist = pblist; while (tlist) { list = g_slist_append(list, ((FileInfo *)tlist->data)->filepath); tlist = g_slist_next(tlist); } /* 写出数据 */ client = gconf_client_get_default(); gconf_client_set_list(client, GCONF_PATH "/shared_file_list", GCONF_VALUE_STRING, list, NULL); if (passwd) gconf_client_set_string(client, GCONF_PATH "/access_shared_limit", passwd, NULL); g_object_unref(client); /* 释放链表 */ g_slist_free(list); } /** * 获取好友链表. * @return 好友链表 */ GSList *CoreThread::GetPalList() { return pallist; } /** * 获取锁. * @return 锁 */ pthread_mutex_t *CoreThread::GetMutex() { return &mutex; } /** * 插入消息(UI线程安全). * @param para 消息参数封装包 * @note 消息数据必须使用utf8编码 * @note (para->pal)不可为null * @note 请不要关心函数内部实现,你只需要按照要求封装消息数据,然后扔给本函数处理就可以了, * 它会想办法将消息按照你所期望的格式插入到你所期望的TextBuffer,否则请发送Bug报告 */ void CoreThread::InsertMessage(MsgPara *para) { GroupInfo *grpinf; SessionAbstract *session; /* 启用UI线程安全保护 */ gdk_threads_enter(); /* 获取群组信息 */ switch (para->btype) { case GROUP_BELONG_TYPE_REGULAR: grpinf = GetPalRegularItem(para->pal); break; case GROUP_BELONG_TYPE_SEGMENT: grpinf = GetPalSegmentItem(para->pal); break; case GROUP_BELONG_TYPE_GROUP: grpinf = GetPalGroupItem(para->pal); break; case GROUP_BELONG_TYPE_BROADCAST: grpinf = GetPalBroadcastItem(para->pal); break; default: grpinf = NULL; break; } /* 如果群组存在则插入消息 */ /* 群组不存在是编程上的错误,请发送Bug报告 */ if (grpinf) { InsertMsgToGroupInfoItem(grpinf, para); if (grpinf->dialog) { session = (SessionAbstract *)g_object_get_data(G_OBJECT( grpinf->dialog), "session-class"); session->OnNewMessageComing(); } } /* 离开UI操作处理 */ gdk_threads_leave(); } /** * 插入消息到群组消息缓冲区(非UI线程安全). * @param grpinf 群组信息 * @param para 消息参数 */ void CoreThread::InsertMsgToGroupInfoItem(GroupInfo *grpinf, MsgPara *para) { GtkTextIter iter; GSList *tlist; gchar *data; tlist = para->dtlist; while (tlist) { data = ((ChipData *)tlist->data)->data; switch (((ChipData *)tlist->data)->type) { case MESSAGE_CONTENT_TYPE_STRING: InsertHeaderToBuffer(grpinf->buffer, para); gtk_text_buffer_get_end_iter(grpinf->buffer, &iter); gtk_text_buffer_insert(grpinf->buffer, &iter, "\n", -1); InsertStringToBuffer(grpinf->buffer, data); gtk_text_buffer_get_end_iter(grpinf->buffer, &iter); gtk_text_buffer_insert(grpinf->buffer, &iter, "\n", -1); lgsys.CommunicateLog(para, "[STRING]%s", data); break; case MESSAGE_CONTENT_TYPE_PICTURE: InsertPixbufToBuffer(grpinf->buffer, data); lgsys.CommunicateLog(para, "[PICTURE]%s", data); break; default: break; } tlist = g_slist_next(tlist); } } /** * 向局域网内所有计算机发送上线信息. * @param pcthrd 核心类 */ void CoreThread::SendNotifyToAll(CoreThread *pcthrd) { Command cmd; cmd.BroadCast(pcthrd->udpsock); cmd.DialUp(pcthrd->udpsock); } /** * 向好友发送iptux特有的数据. * @param pal class PalInfo */ void CoreThread::SendFeatureData(PalInfo *pal) { Command cmd; char path[MAX_PATHLEN]; const gchar *env; int sock; if (*progdt.sign != '\0') cmd.SendMySign(cthrd.udpsock, pal); env = g_get_user_config_dir(); snprintf(path, MAX_PATHLEN, "%s" ICON_PATH "/%s", env, progdt.myicon); if (access(path, F_OK) == 0) cmd.SendMyIcon(cthrd.udpsock, pal); snprintf(path, MAX_PATHLEN, "%s" PHOTO_PATH "/photo", env); if (access(path, F_OK) == 0) { if ((sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) { pop_error(_("Fatal Error!!\nFailed to create new socket!\n%s"), strerror(errno)); exit(1); } cmd.SendSublayer(sock, pal, IPTUX_PHOTOPICOPT, path); close(sock); } } /** * 发送通告本计算机下线的信息. * @param pal class PalInfo */ void CoreThread::SendBroadcastExit(PalInfo *pal) { Command cmd; cmd.SendExit(cthrd.udpsock, pal); } /** * 更新本大爷的个人信息. */ void CoreThread::UpdateMyInfo() { Command cmd; pthread_t pid; PalInfo *pal; GSList *tlist; pthread_mutex_lock(&cthrd.mutex); tlist = cthrd.pallist; while (tlist) { pal = (PalInfo *)tlist->data; if (FLAG_ISSET(pal->flags, 1)) cmd.SendAbsence(cthrd.udpsock, pal); if (FLAG_ISSET(pal->flags, 1) && FLAG_ISSET(pal->flags, 0)) { pthread_create(&pid, NULL, ThreadFunc(SendFeatureData), pal); pthread_detach(pid); } tlist = g_slist_next(tlist); } pthread_mutex_unlock(&cthrd.mutex); } /** * 从好友链表中移除所有好友数据(非UI线程安全). * @note 鉴于好友链表成员不能被删除,所以将成员改为下线标记即可 */ void CoreThread::ClearAllPalFromList() { SessionAbstract *session; GroupInfo *grpinf; PalInfo *pal; GSList *tlist; /* 清除所有好友的在线标志 */ tlist = pallist; while (tlist) { pal = (PalInfo *)tlist->data; FLAG_CLR(pal->flags, 1); tlist = g_slist_next(tlist); } /* 清空常规模式下所有群组的成员 */ tlist = rgllist; while (tlist) { grpinf = (GroupInfo *)tlist->data; g_slist_free(grpinf->member); grpinf->member = NULL; if (grpinf->dialog) { session = (SessionAbstract *)g_object_get_data(G_OBJECT( grpinf->dialog), "session-class"); session->ClearAllPalData(); } tlist = g_slist_next(tlist); } /* 清空网段模式下所有群组的成员 */ tlist = sgmlist; while (tlist) { grpinf = (GroupInfo *)tlist->data; g_slist_free(grpinf->member); grpinf->member = NULL; if (grpinf->dialog) { session = (SessionAbstract *)g_object_get_data(G_OBJECT( grpinf->dialog), "session-class"); session->ClearAllPalData(); } tlist = g_slist_next(tlist); } /* 清空分组模式下所有群组的成员 */ tlist = grplist; while (tlist) { grpinf = (GroupInfo *)tlist->data; g_slist_free(grpinf->member); grpinf->member = NULL; if (grpinf->dialog) { session = (SessionAbstract *)g_object_get_data(G_OBJECT( grpinf->dialog), "session-class"); session->ClearAllPalData(); } tlist = g_slist_next(tlist); } /* 清空广播模式下所有群组的成员 */ tlist = brdlist; while (tlist) { grpinf = (GroupInfo *)tlist->data; g_slist_free(grpinf->member); grpinf->member = NULL; if (grpinf->dialog) { session = (SessionAbstract *)g_object_get_data(G_OBJECT( grpinf->dialog), "session-class"); session->ClearAllPalData(); } tlist = g_slist_next(tlist); } } /** * 从好友链表中获取指定的好友信息数据. * @param ipv4 ipv4 * @return 好友信息数据 */ PalInfo *CoreThread::GetPalFromList(in_addr_t ipv4) { GSList *tlist; tlist = pallist; while (tlist) { if (((PalInfo *)tlist->data)->ipv4 == ipv4) break; tlist = g_slist_next(tlist); } return (PalInfo *)(tlist ? tlist->data : NULL); } /** * 查询好友链表中是否已经存在此IP地址的信息数据. * @param ipv4 ipv4 * @return 存在与否 */ bool CoreThread::ListContainPal(in_addr_t ipv4) { GSList *tlist; tlist = pallist; while (tlist) { if (((PalInfo *)tlist->data)->ipv4 == ipv4) break; tlist = g_slist_next(tlist); } return tlist; } /** * 从好友链表中删除指定的好友信息数据(非UI线程安全). * @param ipv4 ipv4 * @note 鉴于好友链表成员不能被删除,所以将成员改为下线标记即可; * 鉴于群组中只能包含在线的好友,所以若某群组中包含了此好友,则必须从此群组中删除此好友 */ void CoreThread::DelPalFromList(in_addr_t ipv4) { PalInfo *pal; GroupInfo *grpinf; /* 获取好友信息数据,并将其置为下线状态 */ if (!(pal = GetPalFromList(ipv4))) return; FLAG_CLR(pal->flags, 1); /* 从群组中移除好友 */ if ( (grpinf = GetPalRegularItem(pal))) DelPalFromGroupInfoItem(grpinf, pal); if ( (grpinf = GetPalSegmentItem(pal))) DelPalFromGroupInfoItem(grpinf, pal); if ( (grpinf = GetPalGroupItem(pal))) DelPalFromGroupInfoItem(grpinf, pal); if ( (grpinf = GetPalBroadcastItem(pal))) DelPalFromGroupInfoItem(grpinf, pal); } /** * 通告指定的好友信息数据已经被更新(非UI线程安全). * @param ipv4 ipv4 * @note 什么时候会用到?1、好友更新个人资料;2、好友下线后又上线了 * @note 鉴于群组中必须包含所有属于自己的成员,移除不属于自己的成员, * 所以好友信息更新后应该重新调整群组成员; * @note 群组中被更新的成员信息也应该在界面上做出相应更新 */ void CoreThread::UpdatePalToList(in_addr_t ipv4) { PalInfo *pal; GroupInfo *grpinf; SessionAbstract *session; /* 如果好友链表中不存在此好友,则视为程序设计出错 */ if (!(pal = GetPalFromList(ipv4))) return; FLAG_SET(pal->flags, 1); /* 更新好友所在的群组,以及它在UI上的信息 */ /*/* 更新常规模式下的群组 */ if ( (grpinf = GetPalRegularItem(pal))) { if (!g_slist_find(grpinf->member, pal)) { AttachPalToGroupInfoItem(grpinf, pal); } else if (grpinf->dialog) { session = (SessionAbstract *)g_object_get_data(G_OBJECT( grpinf->dialog), "session-class"); session->UpdatePalData(pal); } } else { if (!(grpinf = GetPalRegularItem(pal))) grpinf = AttachPalRegularItem(pal); AttachPalToGroupInfoItem(grpinf, pal); } /*/* 更新网段模式下的群组 */ if ( (grpinf = GetPalSegmentItem(pal))) { if (!g_slist_find(grpinf->member, pal)) { AttachPalToGroupInfoItem(grpinf, pal); } else if (grpinf->dialog) { session = (SessionAbstract *)g_object_get_data(G_OBJECT( grpinf->dialog), "session-class"); session->UpdatePalData(pal); } } else { if (!(grpinf = GetPalSegmentItem(pal))) grpinf = AttachPalSegmentItem(pal); AttachPalToGroupInfoItem(grpinf, pal); } /*/* 更新分组模式下的群组 */ if ( (grpinf = GetPalPrevGroupItem(pal))) { if (!pal->group || strcmp(grpinf->name, pal->group) != 0) { DelPalFromGroupInfoItem(grpinf, pal); if (!(grpinf = GetPalGroupItem(pal))) grpinf = AttachPalGroupItem(pal); AttachPalToGroupInfoItem(grpinf, pal); } else if (grpinf->dialog) { session = (SessionAbstract *)g_object_get_data(G_OBJECT( grpinf->dialog), "session-class"); session->UpdatePalData(pal); } } else { if (!(grpinf = GetPalGroupItem(pal))) grpinf = AttachPalGroupItem(pal); AttachPalToGroupInfoItem(grpinf, pal); } /*/* 更新广播模式下的群组 */ if ( (grpinf = GetPalBroadcastItem(pal))) { if (!g_slist_find(grpinf->member, pal)) { AttachPalToGroupInfoItem(grpinf, pal); } else if (grpinf->dialog) { session = (SessionAbstract *)g_object_get_data(G_OBJECT( grpinf->dialog), "session-class"); session->UpdatePalData(pal); } } else { if (!(grpinf = GetPalBroadcastItem(pal))) grpinf = AttachPalBroadcastItem(pal); AttachPalToGroupInfoItem(grpinf, pal); } } /** * 将好友信息数据加入到好友链表(非UI线程安全). * @param pal class PalInfo * @note 鉴于在线的好友必须被分配到它所属的群组,所以加入好友到好友链表的同时 * 也应该分配好友到相应的群组 */ void CoreThread::AttachPalToList(PalInfo *pal) { GroupInfo *grpinf; /* 将好友加入到好友链表 */ pallist = g_slist_append(pallist, pal); FLAG_SET(pal->flags, 1); /* 将好友加入到相应的群组 */ if (!(grpinf = GetPalRegularItem(pal))) grpinf = AttachPalRegularItem(pal); AttachPalToGroupInfoItem(grpinf, pal); if (!(grpinf = GetPalSegmentItem(pal))) grpinf = AttachPalSegmentItem(pal); AttachPalToGroupInfoItem(grpinf, pal); if (!(grpinf = GetPalGroupItem(pal))) grpinf = AttachPalGroupItem(pal); AttachPalToGroupInfoItem(grpinf, pal); if (!(grpinf = GetPalBroadcastItem(pal))) grpinf = AttachPalBroadcastItem(pal); AttachPalToGroupInfoItem(grpinf, pal); } /** * 获取(pal)在常规模式下的群组信息. * @param pal class PalInfo * @return 群组信息 */ GroupInfo *CoreThread::GetPalRegularItem(PalInfo *pal) { GSList *tlist; tlist = rgllist; while (tlist) { if (((GroupInfo *)tlist->data)->grpid == pal->ipv4) break; tlist = g_slist_next(tlist); } return (GroupInfo *)(tlist ? tlist->data : NULL); } /** * 获取(pal)在网段模式下的群组信息. * @param pal class PalInfo * @return 群组信息 */ GroupInfo *CoreThread::GetPalSegmentItem(PalInfo *pal) { GSList *tlist; char *name; GQuark grpid; /* 获取局域网网段ID */ name = ipv4_get_lan_name(pal->ipv4); grpid = g_quark_from_string(name ? name : _("Others")); g_free(name); tlist = sgmlist; while (tlist) { if (((GroupInfo *)tlist->data)->grpid == grpid) break; tlist = g_slist_next(tlist); } return (GroupInfo *)(tlist ? tlist->data : NULL); } /** * 获取(pal)在分组模式下的群组信息. * @param pal class PalInfo * @return 群组信息 */ GroupInfo *CoreThread::GetPalGroupItem(PalInfo *pal) { GSList *tlist; GQuark grpid; /* 获取组ID */ NO_OPERATION_C grpid = g_quark_from_string(pal->group ? pal->group : _("Others")); tlist = grplist; while (tlist) { if (((GroupInfo *)tlist->data)->grpid == grpid) break; tlist = g_slist_next(tlist); } return (GroupInfo *)(tlist ? tlist->data : NULL); } /** * 获取(pal)在广播模式下的群组信息. * @param pal class PalInfo * @return 群组信息 */ GroupInfo *CoreThread::GetPalBroadcastItem(PalInfo *pal) { return (GroupInfo *)(brdlist ? brdlist->data : NULL); } /** * 黑名单链表中是否包含此项. * @param ipv4 ipv4 * @return 是否包含 */ bool CoreThread::BlacklistContainItem(in_addr_t ipv4) { return g_slist_find(blacklist, GUINT_TO_POINTER(ipv4)); } /** * 加入此项到黑名单链表. * @param ipv4 ipv4 */ void CoreThread::AttachItemToBlacklist(in_addr_t ipv4) { blacklist = g_slist_append(blacklist, GUINT_TO_POINTER(ipv4)); } /** * 清空黑名单链表. */ void CoreThread::ClearBlacklist() { g_slist_free(blacklist); blacklist = NULL; } /** * 获取消息队列项总数. * @return 项数 */ guint CoreThread::GetMsglineItems() { return g_queue_get_length(&msgline); } /** * 查看消息队列首项. * @return 项 */ GroupInfo *CoreThread::GetMsglineHeadItem() { return (GroupInfo *)g_queue_peek_head(&msgline); } /** * 消息队列是否已经包含此项. * @param grpinf 项 * @return 是否包含 */ bool CoreThread::MsglineContainItem(GroupInfo *grpinf) { return g_queue_find(&msgline, grpinf); } /** * 压入项进消息队列. * @param grpinf 项 */ void CoreThread::PushItemToMsgline(GroupInfo *grpinf) { g_queue_push_tail(&msgline, grpinf); } /** * 弹出项从消息队列. * @param grpinf 项 */ void CoreThread::PopItemFromMsgline(GroupInfo *grpinf) { g_queue_remove(&msgline, grpinf); } /** * 附加文件信息到公有文件链表. * @param file 文件信息 */ void CoreThread::AttachFileToPublic(FileInfo *file) { pblist = g_slist_append(pblist, file); } /** * 从公有文件链表删除指定的文件. * @param fileid 文件ID */ void CoreThread::DelFileFromPublic(uint32_t fileid) { GSList *tlist; tlist = pblist; while (tlist) { if (((FileInfo *)tlist->data)->fileid == fileid) { delete (FileInfo *)tlist->data; pblist = g_slist_delete_link(pblist, tlist); break; } tlist = g_slist_next(tlist); } } /** * 清空公有文件链表. */ void CoreThread::ClearFileFromPublic() { for (GSList *tlist = pblist; tlist; tlist = g_slist_next(tlist)) delete (FileInfo *)tlist->data; g_slist_free(pblist); pblist = NULL; } /** * 获取公有文件链表指针. * @return 链表 */ GSList *CoreThread::GetPublicFileList() { return pblist; } /** * 附加文件信息到私有文件链表. * @param file 文件信息 */ void CoreThread::AttachFileToPrivate(FileInfo *file) { prlist = g_slist_append(prlist, file); } /** * 从私有文件链表删除指定的文件. * @param fileid 文件ID */ void CoreThread::DelFileFromPrivate(uint32_t fileid) { GSList *tlist; tlist = prlist; while (tlist) { if (((FileInfo *)tlist->data)->fileid == fileid) { delete (FileInfo *)tlist->data; prlist = g_slist_delete_link(prlist, tlist); break; } tlist = g_slist_next(tlist); } } /** * 清空私有文件链表. */ void CoreThread::ClearFileFromPrivate() { for (GSList *tlist = prlist; tlist; tlist = g_slist_next(tlist)) delete (FileInfo *)tlist->data; g_slist_free(prlist); prlist = NULL; } /** * 获取指定文件ID的文件信息. * @param fileid 文件ID * @return 文件信息 */ FileInfo *CoreThread::GetFileFromAll(uint32_t fileid) { GSList *tlist; tlist = fileid < MAX_SHAREDFILE ? pblist : prlist; while (tlist) { if (((FileInfo *)tlist->data)->fileid == fileid) break; tlist = g_slist_next(tlist); } return (FileInfo *)(tlist ? tlist->data : NULL); } /** * 获取指定文件包编号的文件信息. * @param PacketN 文件包ID * @return 文件信息 * 这个函数主要是为了兼容adroid版的信鸽(IPMSG),IPMSG把包编号转换为 * 16进制放在了本来应该是fileid的地方,在存放文件创建时间的地方放上了包内编号 * 所以在调用这个函数时,传给packageNum的是fileid, * 传的filectime实际上是包内编号 */ FileInfo *CoreThread::GetFileFromAllWithPacketN(uint32_t packageNum,uint32_t filectime) { GSList *tlist; tlist = prlist; while (tlist) { if( (((FileInfo *)tlist->data)->packetn == packageNum) && ((((FileInfo *)tlist->data)->filenum == filectime) ) ) break; tlist = g_slist_next(tlist); } if (tlist != NULL) return (FileInfo *)(tlist ? tlist->data : NULL); tlist = pblist ; while (tlist) { if( (((FileInfo *)tlist->data)->packetn == packageNum) && ((((FileInfo *)tlist->data)->filenum == filectime) ) ) break; tlist = g_slist_next(tlist); } return (FileInfo *)(tlist ? tlist->data : NULL); } /** * 获取共享文件访问密码. * @return 密码字符串 */ const char *CoreThread::GetAccessPublicLimit() { return passwd; } /** * 更新共享文件访问密码. * @param limit 密码字符串 */ void CoreThread::SetAccessPublicLimit(const char *limit) { g_free(passwd); passwd = g_strdup(limit); } /** * 初始化底层数据. */ void CoreThread::InitSublayer() { InitThemeSublayerData(); ReadSharedData(); } /** * 清空底层数据. */ void CoreThread::ClearSublayer() { GSList *tlist; /** * @note 必须在发送下线信息之后才能关闭套接口. */ g_slist_foreach(pallist, GFunc(SendBroadcastExit), NULL); shutdown(tcpsock, SHUT_RDWR); shutdown(udpsock, SHUT_RDWR); server = false; for (tlist = pallist; tlist; tlist = g_slist_next(tlist)) delete (PalInfo *)tlist->data; g_slist_free(pallist); for (tlist = rgllist; tlist; tlist = g_slist_next(tlist)) delete (GroupInfo *)tlist->data; g_slist_free(rgllist); for (tlist = sgmlist; tlist; tlist = g_slist_next(tlist)) delete (GroupInfo *)tlist->data; g_slist_free(sgmlist); for (tlist = grplist; tlist; tlist = g_slist_next(tlist)) delete (GroupInfo *)tlist->data; g_slist_free(grplist); for (tlist = brdlist; tlist; tlist = g_slist_next(tlist)) delete (GroupInfo *)tlist->data; g_slist_free(brdlist); g_slist_free(blacklist); g_queue_clear(&msgline); for (tlist = pblist; tlist; tlist = g_slist_next(tlist)) delete (FileInfo *)tlist->data; g_slist_free(pblist); for (tlist = prlist; tlist; tlist = g_slist_next(tlist)) delete (FileInfo *)tlist->data; g_slist_free(prlist); g_free(passwd); for (tlist = ecsList; tlist; tlist = g_slist_next(tlist)) delete (FileInfo *)tlist->data; g_slist_free(ecsList); if (timerid > 0) g_source_remove(timerid); pthread_mutex_destroy(&mutex); } /** * 初始化主题库底层数据. */ void CoreThread::InitThemeSublayerData() { GtkIconTheme *theme; GtkIconFactory *factory; GtkIconSet *set; GdkPixbuf *pixbuf; theme = gtk_icon_theme_get_default(); gtk_icon_theme_append_search_path(theme, __PIXMAPS_PATH); gtk_icon_theme_append_search_path(theme, __PIXMAPS_PATH "/icon"); gtk_icon_theme_append_search_path(theme, __PIXMAPS_PATH "/menu"); gtk_icon_theme_append_search_path(theme, __PIXMAPS_PATH "/tip"); factory = gtk_icon_factory_new(); gtk_icon_factory_add_default(factory); if ( (pixbuf = gtk_icon_theme_load_icon(theme, "ip-tux", 64, GtkIconLookupFlags(0), NULL))) { set = gtk_icon_set_new_from_pixbuf(pixbuf); gtk_icon_factory_add(factory, "iptux-logo-show", set); g_object_unref(pixbuf); } if ( (pixbuf = gtk_icon_theme_load_icon(theme, "i-tux", 64, GtkIconLookupFlags(0), NULL))) { set = gtk_icon_set_new_from_pixbuf(pixbuf); gtk_icon_factory_add(factory, "iptux-logo-hide", set); g_object_unref(pixbuf); } g_object_unref(factory); } /** * 读取共享文件数据. */ void CoreThread::ReadSharedData() { GConfClient *client; GSList *list, *tlist; FileInfo *file; struct stat64 st; /* 读取共享文件数据 */ client = gconf_client_get_default(); list = gconf_client_get_list(client, GCONF_PATH "/shared_file_list", GCONF_VALUE_STRING, NULL); passwd = gconf_client_get_string(client, GCONF_PATH "/access_shared_limit", NULL); g_object_unref(client); /* 分析数据并加入文件链表 */ for(tlist = list; tlist; tlist = g_slist_next(tlist)) { if (stat64((char *)tlist->data, &st) == -1 || !(S_ISREG(st.st_mode) || S_ISDIR(st.st_mode))) { g_free(tlist->data); tlist->data = NULL; continue; } /* 加入文件信息到链表 */ file = new FileInfo; pblist = g_slist_append(pblist, file); file->fileid = pbn++; /* file->packetn = 0;//没必要设置此字段 */ file->fileattr = S_ISREG(st.st_mode) ? IPMSG_FILE_REGULAR : IPMSG_FILE_DIR; /* file->filesize = 0;//我可不愿意程序启动时在这儿卡住 */ /* file->fileown = NULL;//没必要设置此字段 */ file->filepath = (char *)tlist->data; } g_slist_free(list); } /** * 插入消息头到TextBuffer(非UI线程安全). * @param buffer text-buffer * @param para 消息参数 */ void CoreThread::InsertHeaderToBuffer(GtkTextBuffer *buffer, MsgPara *para) { GtkTextIter iter; gchar *header; /** * @note (para->pal)可能为null. */ switch (para->stype) { case MESSAGE_SOURCE_TYPE_PAL: header = getformattime(FALSE, "%s", para->pal ? para->pal->name : _("unknown")); gtk_text_buffer_get_end_iter(buffer, &iter); gtk_text_buffer_insert_with_tags_by_name(buffer, &iter, header, -1, "pal-color", NULL); g_free(header); break; case MESSAGE_SOURCE_TYPE_SELF: header = getformattime(FALSE, "%s", progdt.nickname); gtk_text_buffer_get_end_iter(buffer, &iter); gtk_text_buffer_insert_with_tags_by_name(buffer, &iter, header, -1, "me-color", NULL); g_free(header); break; case MESSAGE_SOURCE_TYPE_ERROR: header = getformattime(FALSE, "%s", _("")); gtk_text_buffer_get_end_iter(buffer, &iter); gtk_text_buffer_insert_with_tags_by_name(buffer, &iter, header, -1, "error-color", NULL); g_free(header); break; default: break; } } /** * 插入字符串到TextBuffer(非UI线程安全). * @param buffer text-buffer * @param string 字符串 */ void CoreThread::InsertStringToBuffer(GtkTextBuffer *buffer, gchar *string) { static uint32_t count = 0; GtkTextIter iter; GtkTextTag *tag; GMatchInfo *matchinfo; gchar *substring; char name[9]; //8 +1 =9 gint startp, endp; gint urlendp; urlendp = 0; matchinfo = NULL; gtk_text_buffer_get_end_iter(buffer, &iter); g_regex_match_full(progdt.urlregex, string, -1, 0, GRegexMatchFlags(0), &matchinfo, NULL); while (g_match_info_matches(matchinfo)) { snprintf(name, 9, "%" PRIx32, count++); tag = gtk_text_buffer_create_tag(buffer, name, NULL); substring = g_match_info_fetch(matchinfo, 0); g_object_set_data_full(G_OBJECT(tag), "url", substring, GDestroyNotify(g_free)); g_match_info_fetch_pos(matchinfo, 0, &startp, &endp); gtk_text_buffer_insert(buffer, &iter, string + urlendp, startp - urlendp); gtk_text_buffer_insert_with_tags_by_name(buffer, &iter, string + startp, endp - startp, "url-link", name, NULL); urlendp = endp; g_match_info_next(matchinfo, NULL); } g_match_info_free(matchinfo); gtk_text_buffer_insert(buffer, &iter, string + urlendp, -1); } /** * 插入图片到TextBuffer(非UI线程安全). * @param buffer text-buffer * @param path 图片路径 */ void CoreThread::InsertPixbufToBuffer(GtkTextBuffer *buffer, gchar *path) { GtkTextIter start, end; GdkPixbuf *pixbuf; if ( (pixbuf = gdk_pixbuf_new_from_file(path, NULL))) { gtk_text_buffer_get_start_iter(buffer, &start); if (gtk_text_iter_get_char(&start) == OCCUPY_OBJECT || gtk_text_iter_forward_find_char(&start, GtkTextCharPredicate(giter_compare_foreach), GUINT_TO_POINTER(OCCUPY_OBJECT), NULL)) { end = start; gtk_text_iter_forward_char(&end); gtk_text_buffer_delete(buffer, &start, &end); } gtk_text_buffer_insert_pixbuf(buffer, &start, pixbuf); g_object_unref(pixbuf); } } /** * 获取(pal)在分组模式下当前所在的群组. * @param pal class PalInfo * @return 群组信息 */ GroupInfo *CoreThread::GetPalPrevGroupItem(PalInfo *pal) { GSList *tlist; tlist = grplist; while (tlist) { if (g_slist_find(((GroupInfo *)tlist->data)->member, pal)) break; tlist = g_slist_next(tlist); } return (GroupInfo *)(tlist ? tlist->data : NULL); } /** * 增加新项到常规模式群组链表(非UI线程安全). * @param pal class PalInfo * @return 新加入的群组 */ GroupInfo *CoreThread::AttachPalRegularItem(PalInfo *pal) { GroupInfo *grpinf; grpinf = new GroupInfo; grpinf->grpid = pal->ipv4; grpinf->type = GROUP_BELONG_TYPE_REGULAR; grpinf->name = g_strdup(pal->name); grpinf->member = NULL; grpinf->buffer = gtk_text_buffer_new(progdt.table); grpinf->dialog = NULL; rgllist = g_slist_append(rgllist, grpinf); return grpinf; } /** * 增加新项到网段模式群组链表(非UI线程安全). * @param pal class PalInfo * @return 新加入的群组 */ GroupInfo *CoreThread::AttachPalSegmentItem(PalInfo *pal) { GroupInfo *grpinf; char *name; /* 获取局域网网段名称 */ name = ipv4_get_lan_name(pal->ipv4); name = name ? name : g_strdup(_("Others")); grpinf = new GroupInfo; grpinf->grpid = g_quark_from_static_string(name); grpinf->type = GROUP_BELONG_TYPE_SEGMENT; grpinf->name = name; grpinf->member = NULL; grpinf->buffer = gtk_text_buffer_new(progdt.table); grpinf->dialog = NULL; sgmlist = g_slist_append(sgmlist, grpinf); return grpinf; } /** * 增加新项到分组模式群组链表(非UI线程安全). * @param pal class PalInfo * @return 新加入的群组 */ GroupInfo *CoreThread::AttachPalGroupItem(PalInfo *pal) { GroupInfo *grpinf; char *name; /* 备份组名称,用于计算ID号 */ NO_OPERATION_C name = g_strdup(pal->group ? pal->group : _("Others")); grpinf = new GroupInfo; grpinf->grpid = g_quark_from_static_string(name); grpinf->type = GROUP_BELONG_TYPE_GROUP; grpinf->name = name; grpinf->member = NULL; grpinf->buffer = gtk_text_buffer_new(progdt.table); grpinf->dialog = NULL; grplist = g_slist_append(grplist, grpinf); return grpinf; } /** * 增加新项到广播模式群组链表(非UI线程安全). * @param pal class PalInfo * @return 新加入的群组 */ GroupInfo *CoreThread::AttachPalBroadcastItem(PalInfo *pal) { GroupInfo *grpinf; char *name; name = g_strdup(_("Broadcast")); grpinf = new GroupInfo; grpinf->grpid = g_quark_from_static_string(name); grpinf->type = GROUP_BELONG_TYPE_BROADCAST; grpinf->name = name; grpinf->member = NULL; grpinf->buffer = gtk_text_buffer_new(progdt.table); grpinf->dialog = NULL; brdlist = g_slist_append(brdlist, grpinf); return grpinf; } /** * 从群组中移除指定的好友(非UI线程安全). * @param grpinf class GroupInfo * @param pal class PalInfo */ void CoreThread::DelPalFromGroupInfoItem(GroupInfo *grpinf, PalInfo *pal) { GSList *tlist; SessionAbstract *session; if ( (tlist = g_slist_find(grpinf->member, pal))) { grpinf->member = g_slist_delete_link(grpinf->member, tlist); if (grpinf->dialog) { session = (SessionAbstract *)g_object_get_data(G_OBJECT( grpinf->dialog), "session-class"); session->DelPalData(pal); } } } /** * 添加好友到指定的群组(非UI线程安全). * @param grpinf class GroupInfo * @param pal class PalInfo */ void CoreThread::AttachPalToGroupInfoItem(GroupInfo *grpinf, PalInfo *pal) { SessionAbstract *session; grpinf->member = g_slist_append(grpinf->member, pal); if (grpinf->dialog) { session = (SessionAbstract *)g_object_get_data(G_OBJECT( grpinf->dialog), "session-class"); session->InsertPalData(pal); } } /** * 监听UDP服务端口. * @param pcthrd 核心类 */ void CoreThread::RecvUdpData(CoreThread *pcthrd) { struct sockaddr_in addr; socklen_t len; char buf[MAX_UDPLEN]; ssize_t size; while (pcthrd->server) { len = sizeof(addr); if ((size = recvfrom(pcthrd->udpsock, buf, MAX_UDPLEN, 0, (struct sockaddr *)&addr, &len)) == -1) continue; if (size != MAX_UDPLEN) buf[size] = '\0'; UdpData::UdpDataEntry(addr.sin_addr.s_addr, buf, size); } } /** * 监听TCP服务端口. * @param pcthrd 核心类 */ void CoreThread::RecvTcpData(CoreThread *pcthrd) { pthread_t pid; int subsock; listen(pcthrd->tcpsock, 5); while (pcthrd->server) { if ((subsock = accept(pcthrd->tcpsock, NULL, NULL)) == -1) continue; pthread_create(&pid, NULL, ThreadFunc(TcpData::TcpDataEntry), GINT_TO_POINTER(subsock)); pthread_detach(pid); } } /** * 扫描处理程序内部任务(非UI线程安全). * @param pcthrd 核心类 * @return GLib库所需 */ gboolean CoreThread::WatchCoreStatus(CoreThread *pcthrd) { GList *tlist; /* 让等待队列中的群组信息项闪烁 */ pthread_mutex_lock(&pcthrd->mutex); tlist = pcthrd->msgline.head; while (tlist) { mwin.MakeItemBlinking((GroupInfo *)tlist->data, true); tlist = g_list_next(tlist); } pthread_mutex_unlock(&pcthrd->mutex); return TRUE; } /** * 获取特定好友发过来的文件(非UI线程安全). * @param pal class PalInfo * @return palecslist 该好友发过来待接收的文件列表 */ GSList *CoreThread::GetPalEnclosure(PalInfo *pal) { GSList *tlist,*palecslist; palecslist = NULL; for (tlist = ecsList; tlist; tlist = g_slist_next(tlist)) { if (((FileInfo *)tlist->data)->fileown == pal) { palecslist = g_slist_append(palecslist,tlist->data); } } return palecslist; } /** * 压入项进接收文件列表(非UI线程安全). * @param file 文件类指针 */ void CoreThread::PushItemToEnclosureList(FileInfo *file) { ecsList = g_slist_append(ecsList, file); } /** * 从接收文件列表删除项(非UI线程安全). * @param file 文件类指针 */ void CoreThread::PopItemFromEnclosureList(FileInfo *file) { ecsList = g_slist_remove(ecsList, file); delete file; } iptux-0.6.3/src/CoreThread.h000077500000000000000000000124661257720006400156700ustar00rootroot00000000000000// // C++ Interface: CoreThread // // Description: // 程序中的核心线程类,实际上也被设计成了所有底层核心数据的中心点, // 所有数据的更新、查询、插入、删除都必须通过本类接口才能完成。 // ----------------------------------------------------- //2012.02:把文件传送的核心数据全部放在CoreThread类。 // prlist不变,增加ecsList来存放好友发来文件. //------------------------------------------------------ // Author: cwll , (C) 2012 // Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef CORETHREAD_H #define CORETHREAD_H #include "mess.h" /** * @note 请保证插入或更新某成员时,底层优先于UI;删除某成员时,UI优先于底层, * 否则你会把所有事情都搞砸. \n * @note 鉴于(GroupInfo::member)成员发生变动时必须保证函数处于UI线程安全的环境, * 所以UI线程安全的函数对(GroupInfo::member)的访问无须加锁.\n * 若此特性不可被如此利用,请报告bug. \n * @note 如果本程序编码中的某处没有遵循以上规则,请报告bug. */ class CoreThread { public: CoreThread(); ~CoreThread(); void CoreThreadEntry(); void WriteSharedData(); GSList *GetPalList(); pthread_mutex_t *GetMutex(); void InsertMessage(MsgPara *para); void InsertMsgToGroupInfoItem(GroupInfo *grpinf, MsgPara *para); static void SendNotifyToAll(CoreThread *pcthrd); static void SendFeatureData(PalInfo *pal); static void SendBroadcastExit(PalInfo *pal); static void UpdateMyInfo(); void ClearAllPalFromList(); PalInfo *GetPalFromList(in_addr_t ipv4); bool ListContainPal(in_addr_t ipv4); void DelPalFromList(in_addr_t ipv4); void UpdatePalToList(in_addr_t ipv4); void AttachPalToList(PalInfo *pal); GroupInfo *GetPalRegularItem(PalInfo *pal); GroupInfo *GetPalSegmentItem(PalInfo *pal); GroupInfo *GetPalGroupItem(PalInfo *pal); GroupInfo *GetPalBroadcastItem(PalInfo *pal); bool BlacklistContainItem(in_addr_t ipv4); void AttachItemToBlacklist(in_addr_t ipv4); void ClearBlacklist(); guint GetMsglineItems(); GroupInfo *GetMsglineHeadItem(); bool MsglineContainItem(GroupInfo *grpinf); void PushItemToMsgline(GroupInfo *grpinf); void PopItemFromMsgline(GroupInfo *grpinf); GSList *GetPalEnclosure(PalInfo *pal); void PushItemToEnclosureList(FileInfo *file); void PopItemFromEnclosureList(FileInfo *file); GSList *GetPalRcvdEnclosure(PalInfo *pal); void AttachFileToPublic(FileInfo *file); void DelFileFromPublic(uint32_t fileid); void ClearFileFromPublic(); GSList *GetPublicFileList(); void AttachFileToPrivate(FileInfo *file); void DelFileFromPrivate(uint32_t fileid); void ClearFileFromPrivate(); FileInfo *GetFileFromAll(uint32_t fileid); FileInfo *GetFileFromAllWithPacketN(uint32_t packageNum,uint32_t filectime); const char *GetAccessPublicLimit(); void SetAccessPublicLimit(const char *limit); private: void InitSublayer(); void ClearSublayer(); void InitThemeSublayerData(); void ReadSharedData(); void InsertHeaderToBuffer(GtkTextBuffer *buffer, MsgPara *para); void InsertStringToBuffer(GtkTextBuffer *buffer, gchar *string); void InsertPixbufToBuffer(GtkTextBuffer *buffer, gchar *path); GroupInfo *GetPalPrevGroupItem(PalInfo *pal); GroupInfo *AttachPalRegularItem(PalInfo *pal); GroupInfo *AttachPalSegmentItem(PalInfo *pal); GroupInfo *AttachPalGroupItem(PalInfo *pal); GroupInfo *AttachPalBroadcastItem(PalInfo *pal); void DelPalFromGroupInfoItem(GroupInfo *grpinf, PalInfo *pal); void AttachPalToGroupInfoItem(GroupInfo *grpinf, PalInfo *pal); int tcpsock, udpsock; //程序的服务监听套接口 bool server; //程序是否正在服务 GSList *pallist; //好友链表(成员不能被删除) GSList *rgllist, *sgmlist, *grplist, *brdlist; //群组链表(成员不能被删除) GSList *blacklist; //黑名单链表 GQueue msgline; //消息队列 uint32_t pbn, prn; //当前已使用的文件编号(共享/私有) GSList *pblist, *prlist; //文件链表(共享/私有) GSList *ecsList; //文件链表(好友发过来) // GSList *rcvdList; //文件链表(好友发过来已接收) char *passwd; //共享文件密码 guint timerid; //定时器ID pthread_mutex_t mutex; //锁 //回调处理部分函数 private: static void RecvUdpData(CoreThread *pcthrd); static void RecvTcpData(CoreThread *pcthrd); static gboolean WatchCoreStatus(CoreThread *pcthrd); //内联成员函数 public: inline int &TcpSockQuote() { return tcpsock; } inline int &UdpSockQuote() { return udpsock; } inline uint32_t &PbnQuote() { return pbn; } inline uint32_t &PrnQuote() { return prn; } }; #endif iptux-0.6.3/src/DataSettings.cpp000077500000000000000000002032621257720006400165710ustar00rootroot00000000000000// // C++ Implementation: DataSettings // // Description: // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #include "DataSettings.h" #include "ProgramData.h" #include "CoreThread.h" #include "SoundSystem.h" #include "callback.h" #include "output.h" #include "support.h" #include "utils.h" extern ProgramData progdt; extern SoundSystem sndsys; /** * 类构造函数. */ DataSettings::DataSettings():widset(NULL), mdlset(NULL) { InitSublayer(); } /** * 类析构函数. */ DataSettings::~DataSettings() { ClearSublayer(); } /** * 程序数据设置入口. * @param parent 父窗口指针 */ void DataSettings::ResetDataEntry(GtkWidget *parent) { DataSettings dset; GtkWidget *dialog; GtkWidget *note, *label; dialog = dset.CreateMainDialog(parent); /* 创建相关数据设置标签 */ note = gtk_notebook_new(); gtk_notebook_set_tab_pos(GTK_NOTEBOOK(note), GTK_POS_LEFT); gtk_notebook_set_scrollable(GTK_NOTEBOOK(note), TRUE); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), note, TRUE, TRUE, 0); label = gtk_label_new(_("Personal")); gtk_notebook_append_page(GTK_NOTEBOOK(note), dset.CreatePersonal(), label); label = gtk_label_new(_("System")); gtk_notebook_append_page(GTK_NOTEBOOK(note), dset.CreateSystem(), label); #ifdef HAVE_GST label = gtk_label_new(_("Sound")); gtk_notebook_append_page(GTK_NOTEBOOK(note), dset.CreateSound(), label); #endif label = gtk_label_new(_("Network")); gtk_notebook_append_page(GTK_NOTEBOOK(note), dset.CreateNetwork(), label); /* 设置相关数据默认值 */ dset.SetPersonalValue(); dset.SetSystemValue(); #ifdef HAVE_GST dset.SetSoundValue(); #endif dset.SetNetworkValue(); /* 运行对话框 */ gtk_widget_show_all(dialog); mark: switch (gtk_dialog_run(GTK_DIALOG(dialog))) { case GTK_RESPONSE_OK: dset.ObtainPersonalValue(); dset.ObtainSystemValue(); #ifdef HAVE_GST dset.ObtainSoundValue(); #endif dset.ObtainNetworkValue(); progdt.WriteProgData(); CoreThread::UpdateMyInfo(); break; case GTK_RESPONSE_APPLY: dset.ObtainPersonalValue(); dset.ObtainSystemValue(); #ifdef HAVE_GST dset.ObtainSoundValue(); #endif dset.ObtainNetworkValue(); progdt.WriteProgData(); CoreThread::UpdateMyInfo(); goto mark; default: break; } gtk_widget_destroy(dialog); } /** * 初始化底层数据. */ void DataSettings::InitSublayer() { GtkTreeModel *model; g_datalist_init(&widset); g_datalist_init(&mdlset); model = CreateIconModel(); g_datalist_set_data_full(&mdlset, "icon-model", model, GDestroyNotify(g_object_unref)); FillIconModel(model); #ifdef HAVE_GST model = CreateSndModel(); g_datalist_set_data_full(&mdlset, "sound-model", model, GDestroyNotify(g_object_unref)); FillSndModel(model); #endif model = CreateNetworkModel(); g_datalist_set_data_full(&mdlset, "network-model", model, GDestroyNotify(g_object_unref)); FillNetworkModel(model); } /** * 清空底层数据. */ void DataSettings::ClearSublayer() { g_datalist_clear(&widset); g_datalist_clear(&mdlset); } /** * 创建主对话框. * @param parent 父窗口指针 * @return 对话框 */ GtkWidget *DataSettings::CreateMainDialog(GtkWidget *parent) { GtkWidget *dialog; dialog = gtk_dialog_new_with_buttons(_("Preferences"), GTK_WINDOW(parent), GtkDialogFlags(GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR), GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_APPLY, GTK_RESPONSE_APPLY, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK); gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); gtk_container_set_border_width(GTK_CONTAINER(dialog), 5); gtk_widget_set_size_request(dialog, 520, -1); g_datalist_set_data(&widset, "dialog-widget", dialog); return dialog; } /** * 创建与个人相关的数据设置窗体. * @return 主窗体 */ GtkWidget *DataSettings::CreatePersonal() { GtkWidget *box, *hbox; GtkWidget *frame, *sw; GtkWidget *label, *button, *widget; GtkTreeModel *model; box = gtk_vbox_new(FALSE, 0); /* 昵称 */ hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); label = gtk_label_new(_("Your nickname:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); widget = gtk_entry_new(); g_object_set(widget, "has-tooltip", TRUE, NULL); gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 0); g_signal_connect(widget, "query-tooltip", G_CALLBACK(entry_query_tooltip), _("Please input your nickname!")); g_datalist_set_data(&widset, "nickname-entry-widget", widget); /* 群组 */ hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); label = gtk_label_new(_("Your group name:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); widget = gtk_entry_new(); g_object_set(widget, "has-tooltip", TRUE, NULL); gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 0); g_signal_connect(widget, "query-tooltip", G_CALLBACK(entry_query_tooltip), _("Please input your group name!")); g_datalist_set_data(&widset, "mygroup-entry-widget", widget); /* 头像 */ hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); label = gtk_label_new(_("Your face picture:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "icon-model")); widget = CreateIconTree(model); gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 0); g_datalist_set_data(&widset, "myicon-combo-widget", widget); button = gtk_button_new_with_label("..."); g_object_set_data(G_OBJECT(button), "icon-combo-widget", widget); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); g_signal_connect(button, "clicked", G_CALLBACK(AddNewIcon), &widset); /* 文件存档 */ hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); label = gtk_label_new(_("Save files to: ")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); widget = CreateArchiveChooser(); gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 0); g_datalist_set_data(&widset, "archive-chooser-widget", widget); hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); /* 个人形象照片 */ NO_OPERATION_C frame = gtk_frame_new(_("Photo")); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); gtk_box_pack_start(GTK_BOX(hbox), frame, FALSE, FALSE, 0); button = gtk_button_new(); gtk_widget_set_size_request(button, MAX_PREVIEWSIZE, MAX_PREVIEWSIZE); gtk_container_add(GTK_CONTAINER(frame), button); g_signal_connect_swapped(button, "clicked", G_CALLBACK(ChoosePhoto), &widset); widget = gtk_image_new(); gtk_container_add(GTK_CONTAINER(button), widget); g_datalist_set_data(&widset, "photo-image-widget", widget); /* 个性签名 */ NO_OPERATION_C frame = gtk_frame_new(_("Signature")); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); gtk_box_pack_end(GTK_BOX(hbox), frame, TRUE, TRUE, 0); sw = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_container_add(GTK_CONTAINER(frame), sw); widget = gtk_text_view_new(); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(widget), GTK_WRAP_WORD_CHAR); gtk_container_add(GTK_CONTAINER(sw), widget); g_datalist_set_data(&widset, "sign-textview-widget", widget); return box; } /** * 创建与系统相关的数据设置窗体. * @return 主窗体 */ GtkWidget *DataSettings::CreateSystem() { GtkWidget *box, *hbox; GtkWidget *label, *button, *widget; GtkTreeModel *model; box = gtk_vbox_new(FALSE, 0); /* 候选编码 */ hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); label = gtk_label_new(_("Candidate network coding:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); widget = gtk_entry_new(); g_object_set(widget, "has-tooltip", TRUE, NULL); gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 0); g_signal_connect(widget, "query-tooltip", G_CALLBACK(entry_query_tooltip), _("Candidate network coding")); g_datalist_set_data(&widset, "codeset-entry-widget", widget); /* 首选编码 */ hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); label = gtk_label_new(_("Preference network coding:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); widget = gtk_entry_new(); g_object_set(widget, "has-tooltip", TRUE, NULL); gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 0); g_signal_connect(widget, "query-tooltip", G_CALLBACK(entry_query_tooltip), _("Preference network coding (You should be aware of " "what you are doing if you want to modify it.)")); g_datalist_set_data(&widset, "encode-entry-widget", widget); /* 好友头像 */ hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); label = gtk_label_new(_("Pal's default face picture:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "icon-model")); widget = CreateIconTree(model); gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 0); g_datalist_set_data(&widset, "palicon-combo-widget", widget); button = gtk_button_new_with_label("..."); g_object_set_data(G_OBJECT(button), "icon-combo-widget", widget); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); g_signal_connect(button, "clicked", G_CALLBACK(AddNewIcon), &widset); /* 面板字体 */ hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); label = gtk_label_new(_("Panel font:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); widget = CreateFontChooser(); gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 0); g_datalist_set_data(&widset, "font-chooser-widget", widget); /* 有消息时直接弹出聊天窗口 */ widget = gtk_check_button_new_with_label( _("Automatically open the chat dialog")); gtk_box_pack_start(GTK_BOX(box), widget, FALSE, FALSE, 0); g_datalist_set_data(&widset, "chat-check-widget", widget); /* 隐藏面板,只显示状态图标 */ widget = gtk_check_button_new_with_label( _("Automatically hide the panel after login")); gtk_box_pack_start(GTK_BOX(box), widget, FALSE, FALSE, 0); g_datalist_set_data(&widset, "statusicon-check-widget", widget); /* 打开文件传输管理器 */ widget = gtk_check_button_new_with_label( _("Automatically open the File Transmission Management")); gtk_box_pack_start(GTK_BOX(box), widget, FALSE, FALSE, 0); g_datalist_set_data(&widset, "transmission-check-widget", widget); /* enter键发送消息 */ widget = gtk_check_button_new_with_label( _("Use the 'Enter' key to send message")); gtk_box_pack_start(GTK_BOX(box), widget, FALSE, FALSE, 0); g_datalist_set_data(&widset, "enterkey-check-widget", widget); /* 清空聊天历史记录 */ widget = gtk_check_button_new_with_label( _("Automatically clean up the chat history")); gtk_box_pack_start(GTK_BOX(box), widget, FALSE, FALSE, 0); g_datalist_set_data(&widset, "history-check-widget", widget); /* 记录日志 */ widget = gtk_check_button_new_with_label( _("Save the chat history")); gtk_box_pack_start(GTK_BOX(box), widget, FALSE, FALSE, 0); g_datalist_set_data(&widset, "log-check-widget", widget); /* 黑名单 */ widget = gtk_check_button_new_with_label( _("Use the Blacklist (NOT recommended)")); gtk_box_pack_start(GTK_BOX(box), widget, FALSE, FALSE, 0); g_datalist_set_data(&widset, "blacklist-check-widget", widget); /* 过滤共享文件请求 */ widget = gtk_check_button_new_with_label( _("Filter the request of sharing files")); gtk_box_pack_start(GTK_BOX(box), widget, FALSE, FALSE, 0); g_datalist_set_data(&widset, "shared-check-widget", widget); return box; } /** * 创建与声音相关的数据设置窗体. * @return 主窗体 */ GtkWidget *DataSettings::CreateSound() { GtkWidget *box, *hbox, *vbox; GtkWidget *frame, *sw, *chkbutton; GtkWidget *label, *button, *widget; GtkTreeSelection *selection; GtkTreeModel *model; box = gtk_vbox_new(FALSE, 0); /* 声音支持 */ NO_OPERATION_C chkbutton = gtk_check_button_new_with_label(_("Activate the sound support")); gtk_box_pack_start(GTK_BOX(box), chkbutton, FALSE, FALSE, 3); g_datalist_set_data(&widset, "sound-check-widget", chkbutton); /* 音量调整 */ hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); g_signal_connect(chkbutton, "toggled", G_CALLBACK(AdjustSensitive), hbox); label = gtk_label_new(_("Volume Control: ")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); widget = gtk_hscale_new_with_range(0.0, 1.0, 0.01); gtk_scale_set_draw_value(GTK_SCALE(widget), FALSE); gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 0); g_signal_connect(widget, "value-changed", G_CALLBACK(AdjustVolume), NULL); g_datalist_set_data(&widset, "volume-hscale-widget", widget); /* 声音事件 */ NO_OPERATION_C frame = gtk_frame_new(_("Sound Event")); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); gtk_box_pack_start(GTK_BOX(box), frame, TRUE, TRUE, 3); g_signal_connect(chkbutton, "toggled", G_CALLBACK(AdjustSensitive), frame); vbox = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(frame), vbox); /*/* 声音事件树 */ sw = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0); model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "sound-model")); widget = CreateSndTree(model); gtk_container_add(GTK_CONTAINER(sw), widget); g_signal_connect(widget, "button-press-event", G_CALLBACK(PopupPickMenu), NULL); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget)); g_signal_connect(selection, "changed", G_CALLBACK(SndtreeSelectItemChanged), &widset); g_datalist_set_data(&widset, "sound-treeview-widget", widget); /*/* 声音测试 */ hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); widget = CreateSndChooser(); gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 5); g_signal_connect(widget, "file-set", G_CALLBACK(ChooserResetSndtree), &widset); g_datalist_set_data(&widset, "sound-chooser-widget", widget); button = gtk_button_new_with_label(_("Test")); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); g_signal_connect_swapped(button, "clicked", G_CALLBACK(PlayTesting), &widset); button = gtk_button_new_with_label(_("Stop")); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); g_signal_connect(button, "clicked", G_CALLBACK(StopTesting), NULL); return box; } /** * 创建与网络相关的数据设置窗体. * @return 主窗体 */ GtkWidget *DataSettings::CreateNetwork() { char buf[MAX_BUFLEN]; GtkWidget *box, *hbox, *vbox; GtkWidget *frame, *sw; GtkWidget *label, *button, *widget; GtkTreeModel *model; box = gtk_vbox_new(FALSE, 0); /* 接受输入 */ hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); label = gtk_label_new(_("From:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); widget = gtk_entry_new(); g_object_set(widget, "has-tooltip", TRUE, NULL); gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 0); g_signal_connect(widget, "query-tooltip", G_CALLBACK(entry_query_tooltip), _("Beginning of the IP(v4) section")); g_signal_connect(widget, "insert-text", G_CALLBACK(entry_insert_numeric), NULL); g_datalist_set_data(&widset, "startip-entry-widget", widget); label = gtk_label_new(_("To:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); widget = gtk_entry_new(); g_object_set(widget, "has-tooltip", TRUE, NULL); gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 0); g_signal_connect(widget, "query-tooltip", G_CALLBACK(entry_query_tooltip), _("End of the IP(v4) section")); g_signal_connect(widget, "insert-text", G_CALLBACK(entry_insert_numeric), NULL); g_datalist_set_data(&widset, "endip-entry-widget", widget); /* 增加&删除按钮 */ hbox = gtk_hbutton_box_new(); gtk_button_box_set_layout(GTK_BUTTON_BOX(hbox), GTK_BUTTONBOX_SPREAD); gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); snprintf(buf, MAX_BUFLEN, "%s↓↓", _("Add")); button = gtk_button_new_with_label(buf); gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); g_signal_connect_swapped(button, "clicked", G_CALLBACK(ClickAddIpseg), &widset); snprintf(buf, MAX_BUFLEN, "%s↑↑", _("Delete")); button = gtk_button_new_with_label(buf); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); g_signal_connect_swapped(button, "clicked", G_CALLBACK(ClickDelIpseg), &widset); /* 网段树&实用性按钮 */ NO_OPERATION_C frame = gtk_frame_new(_("Added IP(v4) Section:")); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); gtk_box_pack_start(GTK_BOX(box), frame, TRUE, TRUE, 5); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(frame), hbox); /*/* 网段树 */ sw = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_box_pack_start(GTK_BOX(hbox), sw, TRUE, TRUE, 0); model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "network-model")); widget = CreateNetworkTree(model); gtk_container_add(GTK_CONTAINER(sw), widget); g_datalist_set_data(&widset, "network-treeview-widget", widget); /*/* 实用性按钮 */ vbox = gtk_vbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); button = gtk_button_new_with_label(_("Import")); gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); g_signal_connect_swapped(button, "clicked", G_CALLBACK(ImportNetSegment), this); button = gtk_button_new_with_label(_("Export")); gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); g_signal_connect_swapped(button, "clicked", G_CALLBACK(ExportNetSegment), this); button = gtk_button_new_with_label(_("Clear")); gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); g_signal_connect_swapped(button, "clicked", G_CALLBACK(ClearNetSegment), &mdlset); return box; } /** * 为界面设置与个人相关的数据 */ void DataSettings::SetPersonalValue() { char path[MAX_PATHLEN]; GtkWidget *widget; GtkTreeModel *model; GtkTextBuffer *buffer; GdkPixbuf *pixbuf; gint active; widget = GTK_WIDGET(g_datalist_get_data(&widset, "nickname-entry-widget")); gtk_entry_set_text(GTK_ENTRY(widget), progdt.nickname); widget = GTK_WIDGET(g_datalist_get_data(&widset, "mygroup-entry-widget")); gtk_entry_set_text(GTK_ENTRY(widget), progdt.mygroup); widget = GTK_WIDGET(g_datalist_get_data(&widset, "myicon-combo-widget")); model = gtk_combo_box_get_model(GTK_COMBO_BOX(widget)); active = IconfileGetItemPos(model, progdt.myicon); gtk_combo_box_set_active(GTK_COMBO_BOX(widget), active); widget = GTK_WIDGET(g_datalist_get_data(&widset, "archive-chooser-widget")); gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(widget), progdt.path); widget = GTK_WIDGET(g_datalist_get_data(&widset, "photo-image-widget")); snprintf(path, MAX_PATHLEN, "%s" PHOTO_PATH "/photo", g_get_user_config_dir()); if ( (pixbuf = gdk_pixbuf_new_from_file_at_size(path, MAX_PREVIEWSIZE, MAX_PREVIEWSIZE, NULL))) { gtk_image_set_from_pixbuf(GTK_IMAGE(widget), pixbuf); g_object_unref(pixbuf); } widget = GTK_WIDGET(g_datalist_get_data(&widset, "sign-textview-widget")); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(widget)); gtk_text_buffer_set_text(buffer, progdt.sign, -1); } /** * 为界面设置与系统相关的数据 */ void DataSettings::SetSystemValue() { GtkWidget *widget; GtkTreeModel *model; gint active; widget = GTK_WIDGET(g_datalist_get_data(&widset, "codeset-entry-widget")); gtk_entry_set_text(GTK_ENTRY(widget), progdt.codeset); widget = GTK_WIDGET(g_datalist_get_data(&widset, "encode-entry-widget")); gtk_entry_set_text(GTK_ENTRY(widget), progdt.encode); widget = GTK_WIDGET(g_datalist_get_data(&widset, "palicon-combo-widget")); model = gtk_combo_box_get_model(GTK_COMBO_BOX(widget)); active = IconfileGetItemPos(model, progdt.palicon); gtk_combo_box_set_active(GTK_COMBO_BOX(widget), active); widget = GTK_WIDGET(g_datalist_get_data(&widset, "font-chooser-widget")); gtk_font_button_set_font_name(GTK_FONT_BUTTON(widget), progdt.font); widget = GTK_WIDGET(g_datalist_get_data(&widset, "chat-check-widget")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), FLAG_ISSET(progdt.flags, 7)); widget = GTK_WIDGET(g_datalist_get_data(&widset, "statusicon-check-widget")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), FLAG_ISSET(progdt.flags, 6)); widget = GTK_WIDGET(g_datalist_get_data(&widset, "transmission-check-widget")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), FLAG_ISSET(progdt.flags, 5)); widget = GTK_WIDGET(g_datalist_get_data(&widset, "enterkey-check-widget")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), FLAG_ISSET(progdt.flags, 4)); widget = GTK_WIDGET(g_datalist_get_data(&widset, "history-check-widget")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), FLAG_ISSET(progdt.flags, 3)); widget = GTK_WIDGET(g_datalist_get_data(&widset, "log-check-widget")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), FLAG_ISSET(progdt.flags, 2)); widget = GTK_WIDGET(g_datalist_get_data(&widset, "blacklist-check-widget")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), FLAG_ISSET(progdt.flags, 1)); widget = GTK_WIDGET(g_datalist_get_data(&widset, "shared-check-widget")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), FLAG_ISSET(progdt.flags, 0)); } /** * 为界面设置与声音相关的数据 */ void DataSettings::SetSoundValue() { GtkWidget *widget; GtkTreeSelection *selection; GtkTreeModel *model; GtkTreeIter iter; gchar *filepath; widget = GTK_WIDGET(g_datalist_get_data(&widset, "sound-check-widget")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), FLAG_ISSET(progdt.sndfgs, 0)); gtk_toggle_button_toggled(GTK_TOGGLE_BUTTON(widget)); widget = GTK_WIDGET(g_datalist_get_data(&widset, "volume-hscale-widget")); gtk_range_set_value(GTK_RANGE(widget), progdt.volume); widget = GTK_WIDGET(g_datalist_get_data(&widset, "sound-treeview-widget")); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget)); if (gtk_tree_selection_get_selected(selection, &model, &iter)) { widget = GTK_WIDGET(g_datalist_get_data(&widset, "sound-chooser-widget")); gtk_tree_model_get(model, &iter, 2, &filepath, -1); gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(widget), filepath); g_free(filepath); } } /** * 为界面设置与网络相关的数据 */ void DataSettings::SetNetworkValue() { } /** * 头像树(icon-tree)底层数据结构. * 2,0 icon,1 iconfile \n * 头像;文件名(带后缀) \n * @return icon-model */ GtkTreeModel *DataSettings::CreateIconModel() { GtkListStore *model; model = gtk_list_store_new(2, GDK_TYPE_PIXBUF, G_TYPE_STRING); return GTK_TREE_MODEL(model); } /** * 声音树(sound-tree)底层数据结构. * 3,0 toggled,1 comment,2 path \n * 是否被选中;用途注释;文件路径 \n * @return sound-model */ GtkTreeModel *DataSettings::CreateSndModel() { GtkListStore *model; model = gtk_list_store_new(3, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_STRING); return GTK_TREE_MODEL(model); } /** * 网络树(network-tree)底层数据结构. * 3,0 startip,1 endip,2 description \n * 起始IP;终止IP;描述 \n * @return network-model */ GtkTreeModel *DataSettings::CreateNetworkModel() { GtkListStore *model; model = gtk_list_store_new(3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); gtk_tree_sortable_set_default_sort_func(GTK_TREE_SORTABLE(model), GtkTreeIterCompareFunc(NetworkTreeCompareFunc), NULL, NULL); gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(model), GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, GTK_SORT_ASCENDING); return GTK_TREE_MODEL(model); } /** * 为头像树(icon-tree)填充底层数据. * @param model icon-model */ void DataSettings::FillIconModel(GtkTreeModel *model) { GtkIconTheme *theme; GdkPixbuf *pixbuf; GtkTreeIter iter; struct dirent *dirt; DIR *dir; char *file; theme = gtk_icon_theme_get_default(); if ( (dir = opendir(__PIXMAPS_PATH "/icon"))) { while ( (dirt = readdir(dir))) { if (strcmp(dirt->d_name, ".") == 0 || strcmp(dirt->d_name, "..") == 0) continue; file = iptux_erase_filename_suffix(dirt->d_name); if ( (pixbuf = gtk_icon_theme_load_icon(theme, file, MAX_ICONSIZE, GtkIconLookupFlags(0), NULL))) { gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, pixbuf, 1, dirt->d_name, -1); g_object_unref(pixbuf); } g_free(file); } closedir(dir); } } /** * 为声音树(sound-tree)填充底层数据. * @param model sound-model */ void DataSettings::FillSndModel(GtkTreeModel *model) { GtkTreeIter iter; gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, FLAG_ISSET(progdt.sndfgs, 2), 1, _("Transfer finished"), 2, progdt.transtip, -1); gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, FLAG_ISSET(progdt.sndfgs, 1), 1, _("Message received"), 2, progdt.msgtip, -1); } /** * 为网络树(network-tree)填充底层数据. * @param model network-model * @note 与修改此链表的代码段是串行关系,无需加锁 */ void DataSettings::FillNetworkModel(GtkTreeModel *model) { GtkTreeIter iter; GSList *tlist; NetSegment *pns; tlist = progdt.netseg; while (tlist) { pns = (NetSegment *)tlist->data; gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, pns->startip, 1, pns->endip, 2, pns->description, -1); tlist = g_slist_next(tlist); } } /** * 创建头像树(icon-tree). * @param model icon-model * @return 头像树 */ GtkWidget *DataSettings::CreateIconTree(GtkTreeModel *model) { GtkWidget *combo; GtkCellRenderer *cell; combo = gtk_combo_box_new_with_model(model); gtk_combo_box_set_wrap_width(GTK_COMBO_BOX(combo), 5); cell = gtk_cell_renderer_pixbuf_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo), cell, FALSE); gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(combo), cell, "pixbuf", 0, NULL); return combo; } /** * 创建声音树(sound-tree). * @param model sound-model * @return 声音树 */ GtkWidget *DataSettings::CreateSndTree(GtkTreeModel *model) { GtkWidget *view; GtkCellRenderer *cell; GtkTreeViewColumn *column; GtkTreeSelection *selection; GtkTreePath *path; view = gtk_tree_view_new_with_model(model); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(view), TRUE); cell = gtk_cell_renderer_toggle_new(); column = gtk_tree_view_column_new_with_attributes(_("Play"), cell, "active", 0, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); g_signal_connect_swapped(cell, "toggled", G_CALLBACK(model_turn_select), model); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Event"), cell, "text", 1, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); /* 函数ChooserResetView()要求必须选择一项 */ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(view)); gtk_tree_selection_set_mode(selection, GTK_SELECTION_BROWSE); path = gtk_tree_path_new_from_string("0"); gtk_tree_selection_select_path(selection, path); gtk_tree_path_free(path); return view; } /** * 创建网络树(network-tree). * @param model network-model * @return 网络树 */ GtkWidget *DataSettings::CreateNetworkTree(GtkTreeModel *model) { GtkWidget *view; GtkCellRenderer *cell; GtkTreeViewColumn *column; GtkTreeSelection *selection; view = gtk_tree_view_new_with_model(model); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(view), TRUE); gtk_tree_view_set_rubber_banding(GTK_TREE_VIEW(view), TRUE); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(view)); gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("From"), cell, "text", 0, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("To"), cell, "text", 1, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); g_object_set(cell, "editable", TRUE, NULL); g_object_set_data(G_OBJECT(cell), "column-number", GINT_TO_POINTER(2)); column = gtk_tree_view_column_new_with_attributes(_("Description"), cell, "text", 2, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); g_signal_connect(cell, "edited", G_CALLBACK(CellEditText), model); return view; } /** * 创建文件归档选择器. * @return 选择器 */ GtkWidget *DataSettings::CreateArchiveChooser() { GtkWidget *chooser; chooser = gtk_file_chooser_button_new(_("Please select download folder"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(chooser), FALSE); gtk_file_chooser_set_show_hidden(GTK_FILE_CHOOSER(chooser), FALSE); gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(chooser), TRUE); return chooser; } /** * 创建字体选择器. * @return 选择器 */ GtkWidget *DataSettings::CreateFontChooser() { GtkWidget *chooser; chooser = gtk_font_button_new(); gtk_font_button_set_show_style(GTK_FONT_BUTTON(chooser), TRUE); gtk_font_button_set_show_size(GTK_FONT_BUTTON(chooser), TRUE); gtk_font_button_set_use_font(GTK_FONT_BUTTON(chooser), TRUE); gtk_font_button_set_use_size(GTK_FONT_BUTTON(chooser), TRUE); gtk_font_button_set_title(GTK_FONT_BUTTON(chooser), _("Select Font")); return chooser; } /** * 创建声音文件选择器. * @return 选择器 */ GtkWidget *DataSettings::CreateSndChooser() { GtkWidget *chooser; chooser = gtk_file_chooser_button_new(_("Please select a sound file"), GTK_FILE_CHOOSER_ACTION_OPEN); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(chooser), TRUE); gtk_file_chooser_set_show_hidden(GTK_FILE_CHOOSER(chooser), FALSE); return chooser; } /** * 获取与个人相关的数据. */ void DataSettings::ObtainPersonalValue() { GtkWidget *widget; GdkPixbuf *pixbuf; GtkTextBuffer *buffer; GtkTextIter start, end; GtkTreeModel *model; GtkTreeIter iter; char path[MAX_PATHLEN], *file; const gchar *text; gint active; widget = GTK_WIDGET(g_datalist_get_data(&widset, "nickname-entry-widget")); if (*(text = gtk_entry_get_text(GTK_ENTRY(widget))) != '\0') { g_free(progdt.nickname); progdt.nickname = g_strdup(text); } widget = GTK_WIDGET(g_datalist_get_data(&widset, "mygroup-entry-widget")); if (*(text = gtk_entry_get_text(GTK_ENTRY(widget))) != '\0') { g_free(progdt.mygroup); progdt.mygroup = g_strdup(text); } else *progdt.mygroup = '\0'; widget = GTK_WIDGET(g_datalist_get_data(&widset, "myicon-combo-widget")); model = gtk_combo_box_get_model(GTK_COMBO_BOX(widget)); active = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); if (active != -1) { snprintf(path, MAX_PATHLEN, "%d", active); gtk_tree_model_get_iter_from_string(model, &iter, path); gtk_tree_model_get(model, &iter, 1, &file, -1); if (strcmp(progdt.myicon, file) != 0) { snprintf(path, MAX_PATHLEN, __PIXMAPS_PATH "/icon/%s", file); if (access(path, F_OK) != 0) { g_free(file); g_free(progdt.myicon); progdt.myicon = g_strdup("my-icon"); snprintf(path, MAX_PATHLEN, "%s" ICON_PATH "/my-icon", g_get_user_config_dir()); gtk_tree_model_get(model, &iter, 0, &pixbuf, -1); gdk_pixbuf_save(pixbuf, path, "png", NULL, NULL); gtk_icon_theme_add_builtin_icon(progdt.myicon, MAX_ICONSIZE, pixbuf); g_object_unref(pixbuf); } else { g_free(progdt.myicon); progdt.myicon = file; } } else g_free(file); } widget = GTK_WIDGET(g_datalist_get_data(&widset, "archive-chooser-widget")); g_free(progdt.path); progdt.path = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(widget)); widget = GTK_WIDGET(g_datalist_get_data(&widset, "sign-textview-widget")); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(widget)); gtk_text_buffer_get_bounds(buffer, &start, &end); g_free(progdt.sign); progdt.sign = gtk_text_buffer_get_text(buffer, &start, &end, FALSE); } /** * 获取与系统相关的数据. */ void DataSettings::ObtainSystemValue() { GtkWidget *widget; GdkPixbuf *pixbuf; GtkTreeModel *model; GtkTreeIter iter; char path[MAX_PATHLEN], *file; gchar *text; gint active; widget = GTK_WIDGET(g_datalist_get_data(&widset, "codeset-entry-widget")); text = gtk_editable_get_chars(GTK_EDITABLE(widget), 0, -1); g_strstrip(text); if (*text != '\0') { g_free(progdt.codeset); progdt.codeset = text; } else g_free(text); widget = GTK_WIDGET(g_datalist_get_data(&widset, "encode-entry-widget")); text = gtk_editable_get_chars(GTK_EDITABLE(widget), 0, -1); g_strstrip(text); if (*text != '\0') { g_free(progdt.encode); progdt.encode =text; } else g_free(text); widget = GTK_WIDGET(g_datalist_get_data(&widset, "palicon-combo-widget")); model = gtk_combo_box_get_model(GTK_COMBO_BOX(widget)); active = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); if(active != -1) { snprintf(path, MAX_PATHLEN, "%d", active); gtk_tree_model_get_iter_from_string(model, &iter, path); gtk_tree_model_get(model, &iter, 1, &file, -1); if (strcmp(progdt.palicon, file) != 0) { snprintf(path, MAX_PATHLEN, __PIXMAPS_PATH "/icon/%s", file); if (access(path, F_OK) != 0) { g_free(file); g_free(progdt.palicon); progdt.palicon = g_strdup("pal-icon"); snprintf(path, MAX_PATHLEN, "%s" ICON_PATH "/pal-icon", g_get_user_config_dir()); gtk_tree_model_get(model, &iter, 0, &pixbuf, -1); gdk_pixbuf_save(pixbuf, path, "png", NULL, NULL); gtk_icon_theme_add_builtin_icon(progdt.palicon, MAX_ICONSIZE, pixbuf); g_object_unref(pixbuf); } else { g_free(progdt.palicon); progdt.palicon = file; } } else g_free(file); } widget = GTK_WIDGET(g_datalist_get_data(&widset, "font-chooser-widget")); g_free(progdt.font); progdt.font = g_strdup(gtk_font_button_get_font_name(GTK_FONT_BUTTON(widget))); widget = GTK_WIDGET(g_datalist_get_data(&widset, "chat-check-widget")); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) FLAG_SET(progdt.flags, 7); else FLAG_CLR(progdt.flags, 7); widget = GTK_WIDGET(g_datalist_get_data(&widset, "statusicon-check-widget")); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) FLAG_SET(progdt.flags, 6); else FLAG_CLR(progdt.flags, 6); widget = GTK_WIDGET(g_datalist_get_data(&widset, "transmission-check-widget")); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) FLAG_SET(progdt.flags, 5); else FLAG_CLR(progdt.flags, 5); widget = GTK_WIDGET(g_datalist_get_data(&widset, "enterkey-check-widget")); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) FLAG_SET(progdt.flags, 4); else FLAG_CLR(progdt.flags, 4); widget = GTK_WIDGET(g_datalist_get_data(&widset, "history-check-widget")); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) FLAG_SET(progdt.flags, 3); else FLAG_CLR(progdt.flags, 3); widget = GTK_WIDGET(g_datalist_get_data(&widset, "log-check-widget")); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) FLAG_SET(progdt.flags, 2); else FLAG_CLR(progdt.flags, 2); widget = GTK_WIDGET(g_datalist_get_data(&widset, "blacklist-check-widget")); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) FLAG_SET(progdt.flags, 1); else FLAG_CLR(progdt.flags, 1); widget = GTK_WIDGET(g_datalist_get_data(&widset, "shared-check-widget")); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) FLAG_SET(progdt.flags, 0); else FLAG_CLR(progdt.flags, 0); } /** * 获取与声音相关的数据. */ void DataSettings::ObtainSoundValue() { GtkWidget *widget; GtkTreeModel *model; GtkTreeIter iter; gboolean active; gchar *path; widget = GTK_WIDGET(g_datalist_get_data(&widset, "sound-check-widget")); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) FLAG_SET(progdt.sndfgs, 0); else FLAG_CLR(progdt.sndfgs, 0); widget = GTK_WIDGET(g_datalist_get_data(&widset, "volume-hscale-widget")); progdt.volume = gtk_range_get_value(GTK_RANGE(widget)); /** * @see ::FillSndModel(),数据的获取应该与其保持一致. */ widget = GTK_WIDGET(g_datalist_get_data(&widset, "sound-treeview-widget")); model = gtk_tree_view_get_model(GTK_TREE_VIEW(widget)); /*/* 获取文件传输完成的声音信息 */ gtk_tree_model_get_iter_from_string(model, &iter, "0"); gtk_tree_model_get(model, &iter, 0, &active, 2, &path, -1); if (active) FLAG_SET(progdt.sndfgs, 2); else FLAG_CLR(progdt.sndfgs, 2); g_free(progdt.transtip); progdt.transtip = path; /*/* 获取有消息到来的声音信息 */ gtk_tree_model_get_iter_from_string(model, &iter, "1"); gtk_tree_model_get(model, &iter, 0, &active, 2, &path, -1); if (active) FLAG_SET(progdt.sndfgs, 1); else FLAG_CLR(progdt.sndfgs, 1); g_free(progdt.msgtip); progdt.msgtip = path; } /** * 获取与网络相关的数据. */ void DataSettings::ObtainNetworkValue() { GtkWidget *widget; GtkTreeModel *model; GtkTreeIter iter; NetSegment *ns; GSList *tlist; widget = GTK_WIDGET(g_datalist_get_data(&widset, "network-treeview-widget")); model = gtk_tree_view_get_model(GTK_TREE_VIEW(widget)); pthread_mutex_lock(&progdt.mutex); for (tlist = progdt.netseg; tlist; tlist = g_slist_next(tlist)) delete (NetSegment *)tlist->data; g_slist_free(progdt.netseg); progdt.netseg = NULL; if (gtk_tree_model_get_iter_first(model, &iter)) { do { ns = new NetSegment; gtk_tree_model_get(model, &iter, 0, &ns->startip, 1, &ns->endip, 2, &ns->description, -1); progdt.netseg = g_slist_append(progdt.netseg, ns); } while (gtk_tree_model_iter_next(model, &iter)); } pthread_mutex_unlock(&progdt.mutex); } /** * 写出网段数据到指定文件. * @param filename 文件名 * @param list 网段数据链表 */ void DataSettings::WriteNetSegment(const char *filename, GSList *list) { GtkWidget *parent; GSList *tlist; NetSegment *pns; FILE *stream; if (!(stream = fopen(filename, "w"))) { parent = GTK_WIDGET(g_datalist_get_data(&widset, "dialog-widget")); pop_warning(parent, _("Fopen() file \"%s\" failed!\n%s"), filename, strerror(errno)); return; } fprintf(stream, "#format (startIP - endIP //description)"); tlist = list; while (tlist) { pns = (NetSegment *)tlist->data; fprintf(stream, "\n%s - %s //%s", pns->startip, pns->endip, pns->description ? pns->description : ""); tlist = g_slist_next(tlist); } fclose(stream); } /** * 从指定文件读取网段数据. * @param filename 文件名 * @retval list 网段数据链表指针,数据由此返回 */ void DataSettings::ReadNetSegment(const char *filename, GSList **list) { GtkWidget *parent; char buf[3][MAX_BUFLEN], *lineptr; in_addr_t ipv4; NetSegment *ns; FILE *stream; size_t n; if (!(stream = fopen(filename, "r"))) { parent = GTK_WIDGET(g_datalist_get_data(&widset, "dialog-widget")); pop_warning(parent, _("Fopen() file \"%s\" failed!\n%s"), filename, strerror(errno)); return; } n = 0; lineptr = NULL; while (getline(&lineptr, &n, stream) != -1) { if (*(lineptr + strspn(lineptr, "\t\x20")) == '#') continue; switch (sscanf(lineptr, "%s - %s //%s", buf[0], buf[1], buf[2])) { case 3: if (inet_pton(AF_INET, buf[0], &ipv4) <= 0 || inet_pton(AF_INET, buf[1], &ipv4) <= 0) break; ns = new NetSegment; *list = g_slist_append(*list, ns); ns->startip = g_strdup(buf[0]); ns->endip = g_strdup(buf[1]); ns->description = g_strdup(buf[2]); break; case 2: if (inet_pton(AF_INET, buf[0], &ipv4) <= 0 || inet_pton(AF_INET, buf[1], &ipv4) <= 0) break; ns = new NetSegment; *list = g_slist_append(*list, ns); ns->startip = g_strdup(buf[0]); ns->endip = g_strdup(buf[1]); break; default: break; } } g_free(lineptr); fclose(stream); } /** * 创建选择项的弹出菜单. * @param model model * @return 菜单 */ GtkWidget *DataSettings::CreatePopupMenu(GtkTreeModel *model) { GtkWidget *menu, *menuitem; menu = gtk_menu_new(); menuitem = gtk_menu_item_new_with_label(_("Select All")); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(model_select_all), model); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); menuitem = gtk_menu_item_new_with_label(_("Reverse Select")); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(model_turn_all), model); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); menuitem = gtk_menu_item_new_with_label(_("Clear Up")); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(model_clear_all), model); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); return menu; } /** * 查询(pathname)文件在(model)中的位置,若没有则加入到后面. * @param model model * @param pathname 文件路径 * @return 位置 */ gint DataSettings::IconfileGetItemPos(GtkTreeModel *model, const char *pathname) { GtkIconTheme *theme; GdkPixbuf *pixbuf; GtkTreeIter iter; const char *ptr; gchar *file; gint result, pos; /* 让ptr指向文件名 */ ptr = strrchr(pathname, '/'); ptr = ptr ? ptr + 1 : pathname; /* 查询model中是否已经存在此文件 */ pos = 0; if (gtk_tree_model_get_iter_first(model, &iter)) { do { gtk_tree_model_get(model, &iter, 1, &file, -1); result = strcmp(ptr, file); g_free(file); if (result == 0) return pos; pos++; } while (gtk_tree_model_iter_next(model, &iter)); } /* 将文件加入model */ if (access(pathname, F_OK) != 0) { theme = gtk_icon_theme_get_default(); file = iptux_erase_filename_suffix(pathname); pixbuf = gtk_icon_theme_load_icon(theme, file, MAX_ICONSIZE, GtkIconLookupFlags(0), NULL); g_free(file); } else pixbuf = gdk_pixbuf_new_from_file_at_size(pathname, MAX_ICONSIZE, MAX_ICONSIZE, NULL); if (pixbuf) { gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, pixbuf, 1, ptr, -1); g_object_unref(pixbuf); } else pos = -1; return pos; } /** * 弹出选择项的菜单. * @param treeview tree-view * @param event event * @return Gtk+库所需 */ gboolean DataSettings::PopupPickMenu(GtkWidget *treeview, GdkEventButton *event) { GtkWidget *menu; GtkTreeModel *model; if (event->button != 3) return FALSE; model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); menu = CreatePopupMenu(model); gtk_widget_show_all(menu); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, event->button, event->time); return TRUE; } /** * 添加新的头像数据. * @param button button * @param widset widget set */ void DataSettings::AddNewIcon(GtkWidget *button, GData **widset) { GtkWidget *parent, *combo; GtkTreeModel *model; gchar *filename; gint active; parent = GTK_WIDGET(g_datalist_get_data(widset, "dialog-widget")); if (!(filename = choose_file_with_preview( _("Please select a face picture"), parent))) return; combo = GTK_WIDGET(g_object_get_data(G_OBJECT(button), "icon-combo-widget")); model = gtk_combo_box_get_model(GTK_COMBO_BOX(combo)); active = IconfileGetItemPos(model, filename); gtk_combo_box_set_active(GTK_COMBO_BOX(combo), active); g_free(filename); } /** * 选择个人形象照片. * @param widset widget set */ void DataSettings::ChoosePhoto(GData **widset) { GtkWidget *image, *parent; GdkPixbuf *pixbuf; gchar path[MAX_PATHLEN]; gchar *filename; parent = GTK_WIDGET(g_datalist_get_data(widset, "dialog-widget")); if (!(filename = choose_file_with_preview( _("Please select a personal photo"), parent))) return; if ( (pixbuf = gdk_pixbuf_new_from_file(filename, NULL))) { snprintf(path, MAX_PATHLEN, "%s" PHOTO_PATH "/photo", g_get_user_config_dir()); pixbuf_shrink_scale_1(&pixbuf, MAX_PHOTOSIZE, MAX_PHOTOSIZE); gdk_pixbuf_save(pixbuf, path, "bmp", NULL, NULL); //命中率极高,不妨直接保存 image = GTK_WIDGET(g_datalist_get_data(widset, "photo-image-widget")); pixbuf_shrink_scale_1(&pixbuf, MAX_PREVIEWSIZE, MAX_PREVIEWSIZE); gtk_image_set_from_pixbuf(GTK_IMAGE(image), pixbuf); g_object_unref(pixbuf); } g_free(filename); } /** * 根据(chkbutton)的状态来设置(widget)的灵敏度. * @param chkbutton check-button * @param widget widget */ void DataSettings::AdjustSensitive(GtkWidget *chkbutton, GtkWidget *widget) { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(chkbutton))) gtk_widget_set_sensitive(widget, TRUE); else gtk_widget_set_sensitive(widget, FALSE); } /** * 调整声音系统的音量. * @param hscale hscale */ void DataSettings::AdjustVolume(GtkWidget *hscale) { gdouble value; value = gtk_range_get_value(GTK_RANGE(hscale)); sndsys.AdjustVolume(value); } /** * 声音树(sound-tree)选中项变更的响应函数. * @param selection tree-selection * @param widset widget set */ void DataSettings::SndtreeSelectItemChanged(GtkTreeSelection *selection, GData **widset) { GtkWidget *widget; GtkTreeModel *model; GtkTreeIter iter; gchar *path; gtk_tree_selection_get_selected(selection, &model, &iter); gtk_tree_model_get(model, &iter, 2, &path, -1); widget = GTK_WIDGET(g_datalist_get_data(widset, "sound-chooser-widget")); gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(widget), path); g_free(path); } /** * 重设声音文件的响应函数. * @param chooser file-chooser * @param widset widget set */ void DataSettings::ChooserResetSndtree(GtkWidget *chooser, GData **widset) { GtkWidget *treeview; GtkTreeSelection *selection; GtkTreeModel *model; GtkTreeIter iter; gchar *path; treeview = GTK_WIDGET(g_datalist_get_data(widset, "sound-treeview-widget")); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)); path = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(chooser)); gtk_tree_selection_get_selected(selection, &model, &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, 2, path, -1); g_free(path); } /** * 播放测试. * @param widset widget set */ void DataSettings::PlayTesting(GData **widset) { GtkWidget *widget; gchar *path; widget = GTK_WIDGET(g_datalist_get_data(widset, "sound-chooser-widget")); path = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(widget)); sndsys.Playing(path); g_free(path); } /** * 停止播放测试. */ void DataSettings::StopTesting() { sndsys.Stop(); } /** * 网络树(network-tree)排序比较函数. * @param model network-model * @param a A GtkTreeIter in model * @param b Another GtkTreeIter in model * @return 比较值 */ gint DataSettings::NetworkTreeCompareFunc(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b) { gchar *atext, *btext; gint result; gtk_tree_model_get(model, a, 0, &atext, -1); gtk_tree_model_get(model, b, 0, &btext, -1); result = strcmp(atext, btext); g_free(atext); g_free(btext); return result; } /** * 增加一个IP网段. * @param widset widget set */ void DataSettings::ClickAddIpseg(GData **widset) { GtkWidget *startentry, *endentry, *treeview, *parent; GtkTreeModel *model; GtkTreeIter iter; const gchar *starttext, *endtext; in_addr_t startip, endip; /* 合法性检查 */ parent = GTK_WIDGET(g_datalist_get_data(widset, "dialog-widget")); startentry = GTK_WIDGET(g_datalist_get_data(widset, "startip-entry-widget")); starttext = gtk_entry_get_text(GTK_ENTRY(startentry)); if (inet_pton(AF_INET, starttext, &startip) <= 0) { gtk_widget_grab_focus(startentry); pop_warning(parent, _("\nIllegal IP(v4) address: %s!"), starttext); return; } endentry = GTK_WIDGET(g_datalist_get_data(widset, "endip-entry-widget")); endtext = gtk_entry_get_text(GTK_ENTRY(endentry)); if (inet_pton(AF_INET, endtext, &endip) <= 0) { gtk_widget_grab_focus(endentry); pop_warning(parent, _("\nIllegal IP(v4) address: %s!"), endtext); return; } /* 加入网段树 */ startip = ntohl(startip); endip = ntohl(endip); treeview = GTK_WIDGET(g_datalist_get_data(widset, "network-treeview-widget")); model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); gtk_list_store_append(GTK_LIST_STORE(model), &iter); if (startip <= endip) gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, starttext, 1, endtext, -1); else gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, endtext, 1, starttext, -1); /* 扫尾 */ gtk_widget_grab_focus(startentry); gtk_entry_set_text(GTK_ENTRY(startentry), "\0"); gtk_entry_set_text(GTK_ENTRY(endentry), "\0"); } /** * 删除一个IP网段. * @param widset widget set */ void DataSettings::ClickDelIpseg(GData **widset) { GtkWidget *startentry, *endentry, *treeview; GtkTreeSelection *selection; GtkTreeModel *model; GtkTreeIter iter; gchar *starttext, *endtext; treeview = GTK_WIDGET(g_datalist_get_data(widset, "network-treeview-widget")); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)); model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); if (!gtk_tree_model_get_iter_first(model, &iter)) return; /* 删除所有被选中的项,并提取第一项数据 */ starttext = endtext = NULL; do { mark: if (gtk_tree_selection_iter_is_selected(selection, &iter)) { if (!starttext) gtk_tree_model_get(model, &iter, 0, &starttext, 1, &endtext, -1); if (gtk_list_store_remove( GTK_LIST_STORE(model), &iter)) goto mark; break; } } while (gtk_tree_model_iter_next(model, &iter)); /* 把第一项数据填入输入框 */ if (!starttext) return; startentry = GTK_WIDGET(g_datalist_get_data(widset, "startip-entry-widget")); gtk_entry_set_text(GTK_ENTRY(startentry), starttext); g_free(starttext); endentry = GTK_WIDGET(g_datalist_get_data(widset, "endip-entry-widget")); gtk_entry_set_text(GTK_ENTRY(endentry), endtext); g_free(endtext); } /** * 编辑cell. * @param renderer cell-renderer-text * @param path item-path * @param newtext new-text * @param model model */ void DataSettings::CellEditText(GtkCellRendererText *renderer, gchar *path, gchar *newtext, GtkTreeModel *model) { GtkTreeIter iter; gint number; gtk_tree_model_get_iter_from_string(model, &iter, path); number = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(renderer), "column-number")); gtk_list_store_set(GTK_LIST_STORE(model), &iter, number, newtext, -1); } /** * 导入网段数据. * @param dset 数据设置类 */ void DataSettings::ImportNetSegment(DataSettings *dset) { GtkWidget *dialog, *parent; GtkTreeModel *model; GtkTreeIter iter; gchar *filename; GSList *list, *tlist; NetSegment *pns; parent = GTK_WIDGET(g_datalist_get_data(&dset->widset, "dialog-widget")); dialog = gtk_file_chooser_dialog_new(_("Please select a file to import data"), GTK_WINDOW(parent), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT); gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), g_get_home_dir()); switch (gtk_dialog_run(GTK_DIALOG(dialog))) { case GTK_RESPONSE_ACCEPT: model = GTK_TREE_MODEL(g_datalist_get_data(&dset->mdlset, "network-model")); gtk_list_store_clear(GTK_LIST_STORE(model)); list = NULL; filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); dset->ReadNetSegment(filename, &list); g_free(filename); tlist = list; while (tlist) { pns = (NetSegment *)tlist->data; gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, pns->startip, 1, pns->endip, 2, pns->description, -1); tlist = g_slist_next(tlist); } for (tlist = list; tlist; tlist = g_slist_next(tlist)) delete (NetSegment *)tlist->data; g_slist_free(list); default: break; } gtk_widget_destroy(dialog); } /** * 导出网段数据. * @param dset 数据设置类 */ void DataSettings::ExportNetSegment(DataSettings *dset) { GtkWidget *dialog, *parent; GtkTreeModel *model; GtkTreeIter iter; gchar *filename; GSList *list, *tlist; NetSegment *ns; parent = GTK_WIDGET(g_datalist_get_data(&dset->widset, "dialog-widget")); dialog = gtk_file_chooser_dialog_new(_("Save data to file"), GTK_WINDOW(parent), GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT); gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), g_get_home_dir()); switch (gtk_dialog_run(GTK_DIALOG(dialog))) { case GTK_RESPONSE_ACCEPT: model = GTK_TREE_MODEL(g_datalist_get_data(&dset->mdlset, "network-model")); if (!gtk_tree_model_get_iter_first(model, &iter)) break; list = NULL; do { ns = new NetSegment; gtk_tree_model_get(model, &iter, 0, &ns->startip, 1, &ns->endip, 2, &ns->description, -1); list = g_slist_append(list, ns); } while (gtk_tree_model_iter_next(model, &iter)); filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); dset->WriteNetSegment(filename, list); g_free(filename); for (tlist = list; tlist; tlist = g_slist_next(tlist)) delete (NetSegment *)tlist->data; g_slist_free(list); default: break; } gtk_widget_destroy(dialog); } /** * 清空网段数据. * @param mdlset model set */ void DataSettings::ClearNetSegment(GData **mdlset) { GtkTreeModel *model; model = GTK_TREE_MODEL(g_datalist_get_data(mdlset, "network-model")); gtk_list_store_clear(GTK_LIST_STORE(model)); } iptux-0.6.3/src/DataSettings.h000077500000000000000000000057661257720006400162470ustar00rootroot00000000000000// // C++ Interface: DataSettings // // Description:程序功能、数据设置 // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef DATASETTINGS_H #define DATASETTINGS_H #include "mess.h" class DataSettings { public: DataSettings(); ~DataSettings(); static void ResetDataEntry(GtkWidget *parent); private: void InitSublayer(); void ClearSublayer(); GtkWidget *CreateMainDialog(GtkWidget *parent); GtkWidget *CreatePersonal(); GtkWidget *CreateSystem(); GtkWidget *CreateSound(); GtkWidget *CreateNetwork(); void SetPersonalValue(); void SetSystemValue(); void SetSoundValue(); void SetNetworkValue(); GtkTreeModel *CreateIconModel(); GtkTreeModel *CreateSndModel(); GtkTreeModel *CreateNetworkModel(); void FillIconModel(GtkTreeModel *model); void FillSndModel(GtkTreeModel *model); void FillNetworkModel(GtkTreeModel *model); GtkWidget *CreateIconTree(GtkTreeModel *model); GtkWidget *CreateSndTree(GtkTreeModel *model); GtkWidget *CreateNetworkTree(GtkTreeModel *model); GtkWidget *CreateArchiveChooser(); GtkWidget *CreateFontChooser(); GtkWidget *CreateSndChooser(); GData *widset; //窗体集 GData *mdlset; //数据model集 private: void ObtainPersonalValue(); void ObtainSystemValue(); void ObtainSoundValue(); void ObtainNetworkValue(); void WriteNetSegment(const char *filename, GSList *list); void ReadNetSegment(const char *filename, GSList **list); static GtkWidget *CreatePopupMenu(GtkTreeModel *model); static gint IconfileGetItemPos(GtkTreeModel *model, const char *pathname); //回调处理部分 private: static gboolean PopupPickMenu(GtkWidget *treeview, GdkEventButton *event); static void AddNewIcon(GtkWidget *button, GData **widset); static void ChoosePhoto(GData **widset); static void AdjustSensitive(GtkWidget *chkbutton, GtkWidget *widget); static void AdjustVolume(GtkWidget *hscale); static void SndtreeSelectItemChanged(GtkTreeSelection *selection, GData **widset); static void ChooserResetSndtree(GtkWidget *chooser, GData **widset); static void PlayTesting(GData **widset); static void StopTesting(); static gint NetworkTreeCompareFunc(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b); static void ClickAddIpseg(GData **widset); static void ClickDelIpseg(GData **widset); static void CellEditText(GtkCellRendererText *renderer, gchar *path, gchar *newtext, GtkTreeModel *model); static void ImportNetSegment(DataSettings *dset); static void ExportNetSegment(DataSettings *dset); static void ClearNetSegment(GData **mdlset); }; #endif iptux-0.6.3/src/DetectPal.cpp000077500000000000000000000070771257720006400160520ustar00rootroot00000000000000// // C++ Implementation: DetectPal // // Description: // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #include "DetectPal.h" #include "CoreThread.h" #include "Command.h" #include "callback.h" #include "output.h" extern CoreThread cthrd; /** * 类构造函数. */ DetectPal::DetectPal():widset(NULL) { g_datalist_init(&widset); } /** * 类析构函数. */ DetectPal::~DetectPal() { g_datalist_clear(&widset); } /** * 探测好友入口. * @param parent 父窗口指针 */ void DetectPal::DetectEntry(GtkWidget *parent) { GtkWidget *dialog; DetectPal dpal; /* 创建对话框窗体 */ dialog = dpal.CreateMainDialog(parent); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), dpal.CreateInputArea(), TRUE, TRUE, 0); /* 运行对话框 */ gtk_widget_show_all(dialog); mark: switch (gtk_dialog_run(GTK_DIALOG(dialog))) { case GTK_RESPONSE_ACCEPT: dpal.SendDetectPacket(); goto mark; default: break; } gtk_widget_destroy(dialog); } /** * 创建主对话框. * @param parent 父窗口指针 * @return 对话框 */ GtkWidget *DetectPal::CreateMainDialog(GtkWidget *parent) { GtkWidget *dialog; dialog = gtk_dialog_new_with_buttons(_("Detect pals"), GTK_WINDOW(parent), GtkDialogFlags(GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR), _("Detect"), GTK_RESPONSE_ACCEPT, _("Cancel"), GTK_RESPONSE_CANCEL, NULL); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT); gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); gtk_container_set_border_width(GTK_CONTAINER(dialog), 5); g_datalist_set_data(&widset, "dialog-widget", dialog); return dialog; } /** * 创建接受输入区域. * @return 主窗体 */ GtkWidget *DetectPal::CreateInputArea() { GtkWidget *frame; GtkWidget *widget; frame = gtk_frame_new(_("Please input an IP address (IPv4 only):")); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); widget = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(widget), INET_ADDRSTRLEN); g_object_set(widget, "has-tooltip", TRUE, NULL); gtk_container_add(GTK_CONTAINER(frame), widget); g_signal_connect(widget, "query-tooltip", G_CALLBACK(entry_query_tooltip), _("Please input an IP address (IPv4 only)!")); g_signal_connect(widget, "insert-text", G_CALLBACK(entry_insert_numeric), NULL); g_datalist_set_data(&widset, "ipv4-entry-widget", widget); return frame; } /** * 发送探测数据包. */ void DetectPal::SendDetectPacket() { GtkWidget *widget, *parent; Command cmd; in_addr_t ipv4; const char *text; parent = GTK_WIDGET(g_datalist_get_data(&widset, "dialog-widget")); widget = GTK_WIDGET(g_datalist_get_data(&widset, "ipv4-entry-widget")); gtk_widget_grab_focus(widget); //为下一次任务做准备 text = gtk_entry_get_text(GTK_ENTRY(widget)); if (inet_pton(AF_INET, text, &ipv4) <= 0) { pop_warning(parent, _("\nIllegal IP(v4) address: %s!"), text); return; } cmd.SendDetectPacket(cthrd.UdpSockQuote(), ipv4); pop_info(parent, _("The notification has been sent to %s."), text); gtk_entry_set_text(GTK_ENTRY(widget), ""); } iptux-0.6.3/src/DetectPal.h000077500000000000000000000010351257720006400155030ustar00rootroot00000000000000// // C++ Interface: DetectPal // // Description:探测好友 // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef DETECTPAL_H #define DETECTPAL_H #include "deplib.h" class DetectPal { public: DetectPal(); ~DetectPal(); static void DetectEntry(GtkWidget *parent); private: GtkWidget *CreateMainDialog(GtkWidget *parent); GtkWidget *CreateInputArea(); void SendDetectPacket(); GData *widset; }; #endif iptux-0.6.3/src/DialogBase.cpp000066400000000000000000000772651257720006400162020ustar00rootroot00000000000000// // C++ Implementation: DialogBase // // Description: // 这个类是DialogPeer和DialogGroup的相同部分。尽量把相同的部分放在一起。 // // Author: Jiejing.Zhang , (C) 2010 // Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #include "DialogBase.h" #include "DialogPeer.h" #include "ProgramData.h" #include "CoreThread.h" #include "MainWindow.h" #include "LogSystem.h" #include "Command.h" #include "SendFile.h" #include "HelpDialog.h" #include "callback.h" #include "output.h" #include "support.h" #include "utils.h" #include "AnalogFS.h" extern ProgramData progdt; extern CoreThread cthrd; extern MainWindow mwin; DialogBase::DialogBase(GroupInfo *grp) :widset(NULL), mdlset(NULL),dtset(NULL), accel(NULL), grpinf(grp), totalsendsize(0) { InitSublayerGeneral(); } DialogBase::~DialogBase() { if(timersend > 0) g_source_remove(timersend); ClearSublayerGeneral(); } /** * 初始化底层数据. */ void DialogBase::InitSublayerGeneral() { g_datalist_init(&widset); g_datalist_init(&mdlset); g_datalist_init(&dtset); accel = gtk_accel_group_new(); } /** * 清空底层数据. */ void DialogBase::ClearSublayerGeneral() { if (FLAG_ISSET(progdt.flags, 3)) ClearHistoryTextView(); grpinf->dialog = NULL; g_datalist_clear(&widset); g_datalist_clear(&mdlset); g_datalist_clear(&dtset); g_object_unref(accel); } /** * 清空聊天历史记录. */ void DialogBase::ClearHistoryTextView() { GtkWidget *widget; GtkTextBuffer *buffer; GtkTextTagTable *table; GtkTextIter start, end; GSList *taglist, *tlist; widget = GTK_WIDGET(g_datalist_get_data(&widset, "history-textview-widget")); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(widget)); table = gtk_text_buffer_get_tag_table(buffer); /* 清除用于局部标记的GtkTextTag */ gtk_text_buffer_get_bounds(buffer, &start, &end); while (!gtk_text_iter_equal(&start, &end)) { tlist = taglist = gtk_text_iter_get_tags(&start); while (tlist) { /* 如果没有"global"标记,则表明此tag为局部标记,可以移除 */ if (!g_object_get_data(G_OBJECT(tlist->data), "global")) gtk_text_tag_table_remove(table, GTK_TEXT_TAG(tlist->data)); tlist = g_slist_next(tlist); } g_slist_free(taglist); gtk_text_iter_forward_char(&start); } /* 清除内容 */ gtk_text_buffer_get_bounds(buffer, &start, &end); gtk_text_buffer_delete(buffer, &start, &end); } /** * 滚动聊天历史记录区. */ void DialogBase::ScrollHistoryTextview() { GtkWidget *widget; GtkTextBuffer *buffer; GtkTextIter end; GtkTextMark *mark; widget = GTK_WIDGET(g_datalist_get_data(&widset, "history-textview-widget")); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(widget)); gtk_text_buffer_get_end_iter(buffer, &end); mark = gtk_text_buffer_create_mark(buffer, NULL, &end, FALSE); gtk_text_view_scroll_to_mark(GTK_TEXT_VIEW(widget), mark, 0.0, TRUE, 0.0, 0.0); gtk_text_buffer_delete_mark(buffer, mark); } /** * 窗口打开情况下,新消息来到以后的接口 */ void DialogBase::OnNewMessageComing() { this->NotifyUser(); this->ScrollHistoryTextview(); } /** * 在窗口打开并且没有设置为最顶端的窗口时候,用窗口在任务栏的闪动来提示用户 */ void DialogBase::NotifyUser() { #if GTK_CHECK_VERSION(2,8,0) GtkWindow *window; window = GTK_WINDOW(g_datalist_get_data(&widset, "window-widget")); if (!gtk_window_has_toplevel_focus(window)) gtk_window_set_urgency_hint(window, TRUE); #endif } /** * 添加附件. * @param list 文件链表 */ void DialogBase::AttachEnclosure(const GSList *list) { GtkWidget *widget,*pbar; GtkTreeModel *model; GtkTreeIter iter; GdkPixbuf *pixbuf, *rpixbuf, *dpixbuf; struct stat64 st; const GSList *tlist,*pallist; AnalogFS afs; int64_t filesize; char *filename,*filepath, *progresstip; FileInfo *file; uint32_t filenum = 0; /* 获取文件图标 */ rpixbuf = obtain_pixbuf_from_stock(GTK_STOCK_FILE); dpixbuf = obtain_pixbuf_from_stock(GTK_STOCK_DIRECTORY); /* 插入附件树 */ widget = GTK_WIDGET(g_datalist_get_data(&widset, "file-send-treeview-widget")); model = gtk_tree_view_get_model(GTK_TREE_VIEW(widget)); tlist = list; while (tlist) { if (stat64((const char *)tlist->data, &st) == -1 || !(S_ISREG(st.st_mode) || S_ISDIR(st.st_mode))) { tlist = g_slist_next(tlist); continue; } /* 获取文件类型图标 */ if (S_ISREG(st.st_mode)) pixbuf = rpixbuf; else if (S_ISDIR(st.st_mode)) pixbuf = dpixbuf; else pixbuf = NULL; filesize = afs.ftwsize((char *)tlist->data); filename = ipmsg_get_filename_me((char *)tlist->data,&filepath); pallist = GetSelPal(); while(pallist) { file = new FileInfo; file->fileid = cthrd.PrnQuote()++; /* file->packetn = 0;//没必要设置此字段 */ file->fileattr = S_ISREG(st.st_mode) ? IPMSG_FILE_REGULAR : IPMSG_FILE_DIR; file->filesize = filesize; file->filepath = g_strdup((char *)tlist->data); file->filectime = uint32_t(st.st_ctime); file->filenum = filenum; file->fileown = (PalInfo *)(pallist->data); /* 加入文件信息到中心节点 */ pthread_mutex_lock(cthrd.GetMutex()); cthrd.AttachFileToPrivate(file); pthread_mutex_unlock(cthrd.GetMutex()); /* 添加数据 */ gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, pixbuf,1, filename, 2,numeric_to_size(filesize),3,tlist->data, 4,file,5,file->fileown->name, -1); pallist = g_slist_next(pallist); } filenum++; /* 转到下一个文件节点 */ tlist = g_slist_next(tlist); } //计算待发送文件总计大小 totalsendsize = 0; gtk_tree_model_get_iter_first(model, &iter); do { //遍历待发送model gtk_tree_model_get(model, &iter,4,&file, -1); totalsendsize += file->filesize; } while (gtk_tree_model_iter_next(model, &iter)); /* 释放文件图标 */ if (rpixbuf) g_object_unref(rpixbuf); if (dpixbuf) g_object_unref(dpixbuf); pbar = GTK_WIDGET(g_datalist_get_data(&widset, "file-send-progress-bar-widget")); progresstip = g_strdup_printf("%s To Send.",numeric_to_size(totalsendsize)); gtk_progress_bar_set_text(GTK_PROGRESS_BAR(pbar), _(progresstip)); g_free(progresstip); } /* * 主窗口的信号连接 */ void DialogBase::MainWindowSignalSetup(GtkWidget *window) { g_object_set_data(G_OBJECT(window), "session-class", this); g_signal_connect_swapped(window, "destroy", G_CALLBACK(DialogDestory), this); g_signal_connect_swapped(window, "drag-data-received", G_CALLBACK(DragDataReceived), this); g_signal_connect(window, "configure-event", G_CALLBACK(WindowConfigureEvent), &dtset); g_signal_connect(window, "focus-in-event", G_CALLBACK(ClearNotify), NULL); } /** * 创建消息输入区域. * @return 主窗体 */ GtkWidget *DialogBase::CreateInputArea() { GtkWidget *frame, *box, *sw; GtkWidget *hbb, *button; GtkWidget *widget, *window; frame = gtk_frame_new(NULL); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); box = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(frame), box); /* 接受输入 */ sw = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_box_pack_start(GTK_BOX(box), sw, TRUE, TRUE, 0); widget = gtk_text_view_new(); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(widget), GTK_WRAP_WORD); gtk_drag_dest_add_uri_targets(widget); gtk_container_add(GTK_CONTAINER(sw), widget); g_signal_connect_swapped(widget, "drag-data-received", G_CALLBACK(DragDataReceived), this); g_datalist_set_data(&widset, "input-textview-widget", widget); /* 功能按钮 */ window = GTK_WIDGET(g_datalist_get_data(&widset, "window-widget")); hbb = gtk_hbutton_box_new(); gtk_button_box_set_layout(GTK_BUTTON_BOX(hbb), GTK_BUTTONBOX_END); gtk_box_pack_start(GTK_BOX(box), hbb, FALSE, FALSE, 0); button = gtk_button_new_with_label(_("Close")); gtk_box_pack_end(GTK_BOX(hbb), button, FALSE, FALSE, 0); g_signal_connect_swapped(button, "clicked", G_CALLBACK(gtk_widget_destroy), window); button = gtk_button_new_with_label(_("Send")); gtk_widget_add_accelerator(button, "clicked", accel, GDK_Return, FLAG_ISSET(progdt.flags, 4) ? GdkModifierType(0) : GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); gtk_box_pack_end(GTK_BOX(hbb), button, FALSE, FALSE, 0); g_signal_connect_swapped(button, "clicked", G_CALLBACK(SendMessage), this); return frame; } /** * 创建聊天历史记录区域. * @return 主窗体. */ GtkWidget *DialogBase::CreateHistoryArea() { GtkWidget *frame, *sw; GtkWidget *widget; frame = gtk_frame_new(_("Chat History")); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); sw = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_container_add(GTK_CONTAINER(frame), sw); widget = gtk_text_view_new_with_buffer(grpinf->buffer); gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(widget), FALSE); gtk_text_view_set_editable(GTK_TEXT_VIEW(widget), FALSE); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(widget), GTK_WRAP_WORD); gtk_container_add(GTK_CONTAINER(sw), widget); g_signal_connect(widget, "key-press-event", G_CALLBACK(textview_key_press_event), NULL); g_signal_connect(widget, "event-after", G_CALLBACK(textview_event_after), NULL); g_signal_connect(widget, "motion-notify-event", G_CALLBACK(textview_motion_notify_event), NULL); g_signal_connect(widget, "visibility-notify-event", G_CALLBACK(textview_visibility_notify_event), NULL); g_datalist_set_data(&widset, "history-textview-widget", widget); /* 滚动消息到最末位置 */ ScrollHistoryTextview(); return frame; } /** * 创建文件菜单. * @return 菜单 */ GtkWidget *DialogBase::CreateFileMenu() { GtkWidget *menushell, *window,*treeview; GtkWidget *menu, *menuitem; window = GTK_WIDGET(g_datalist_get_data(&widset, "window-widget")); menushell = gtk_menu_item_new_with_mnemonic(_("_File")); menu = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menushell), menu); menuitem = gtk_menu_item_new_with_label(_("Attach File")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(AttachRegular), this); gtk_widget_add_accelerator(menuitem, "activate", accel, GDK_S, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); menuitem = gtk_menu_item_new_with_label(_("Attach Folder")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(AttachFolder), this); gtk_widget_add_accelerator(menuitem, "activate", accel, GDK_D, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); treeview = GTK_WIDGET(g_datalist_get_data(&widset, "file-send-treeview-widget")); menuitem = gtk_menu_item_new_with_label(_("Remove Selected")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(RemoveSelectedFromTree), treeview); gtk_widget_add_accelerator(menuitem, "activate", accel, GDK_R, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); menuitem = gtk_tearoff_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); menuitem = gtk_menu_item_new_with_label(_("Close")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(gtk_widget_destroy), window); gtk_widget_add_accelerator(menuitem, "activate", accel, GDK_W, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); g_datalist_set_data(&widset, "file-menu",menu); return menushell; } /** * 创建帮助菜单. * @return 菜单 */ GtkWidget *DialogBase::CreateHelpMenu() { GtkWidget *menushell; GtkWidget *menu, *menuitem; menushell = gtk_menu_item_new_with_mnemonic(_("_Help")); menu = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menushell), menu); menuitem = gtk_image_menu_item_new_from_stock(GTK_STOCK_ABOUT, accel); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect(menuitem, "activate", G_CALLBACK(HelpDialog::AboutEntry), NULL); return menushell; } /** * 选择附件. * @param fileattr 文件类型 * @return 文件链表 */ GSList *DialogBase::PickEnclosure(uint32_t fileattr) { GtkWidget *dialog, *parent; GtkFileChooserAction action; const char *title; GSList *list; if (GET_MODE(fileattr) == IPMSG_FILE_REGULAR) { action = GTK_FILE_CHOOSER_ACTION_OPEN; title = _("Choose enclosure files"); } else { action = GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER; title = _("Choose enclosure folders"); } parent = GTK_WIDGET(g_datalist_get_data(&widset, "dialog-widget")); dialog = gtk_file_chooser_dialog_new(title, GTK_WINDOW(parent), action, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(dialog), FALSE); gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog), TRUE); gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), g_get_home_dir()); switch (gtk_dialog_run(GTK_DIALOG(dialog))) { case GTK_RESPONSE_ACCEPT: list = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(dialog)); break; case GTK_RESPONSE_CANCEL: default: list = NULL; break; } gtk_widget_destroy(dialog); return list; } /** * 发送附件消息. * @return 是否发送数据 */ bool DialogBase::SendEnclosureMsg() { GtkWidget *treeview; GtkTreeModel *model; GtkTreeIter iter; GSList *list; gchar *filepath; FileInfo *file; treeview = GTK_WIDGET(g_datalist_get_data(&widset, "file-send-treeview-widget")); model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); if (!gtk_tree_model_get_iter_first(model, &iter)) return false; /* 获取文件并发送 */ list = NULL; do { gtk_tree_model_get(model, &iter, 3, &filepath,4,&file,-1); list = g_slist_append(list,file); } while (gtk_tree_model_iter_next(model, &iter)); BroadcastEnclosureMsg(list); g_slist_free(list); timersend = gdk_threads_add_timeout(400, (GSourceFunc)UpdateFileSendUI, this); return true; } /** * 回馈消息. * @param msg 消息 */ void DialogBase::FeedbackMsg(const gchar *msg) { MsgPara para; ChipData *chip; /* 构建消息封装包 */ para.pal = NULL; para.stype = MESSAGE_SOURCE_TYPE_SELF; para.btype = grpinf->type; chip = new ChipData; chip->type = MESSAGE_CONTENT_TYPE_STRING; chip->data = g_strdup(msg); para.dtlist = g_slist_append(NULL, chip); /* 交给某人处理吧 */ cthrd.InsertMsgToGroupInfoItem(grpinf, ¶); } /** * 添加常规文件附件. * @param dlgpr 对话框类 */ void DialogBase::AttachRegular(DialogBase *dlgpr) { GSList *list; if (!(list = dlgpr->PickEnclosure(IPMSG_FILE_REGULAR))) return; dlgpr->AttachEnclosure(list); g_slist_foreach(list, GFunc(g_free), NULL); g_slist_free(list); } /** * 添加目录文件附件. * @param dlgpr 对话框类 */ void DialogBase::AttachFolder(DialogBase *dlgpr) { GSList *list; if (!(list = dlgpr->PickEnclosure(IPMSG_FILE_DIR))) return; dlgpr->AttachEnclosure(list); g_slist_foreach(list, GFunc(g_free), NULL); g_slist_free(list); } /** * 清空聊天历史记录缓冲区. * @param dlgpr 对话框类 */ void DialogBase::ClearHistoryBuffer(DialogBase *dlgpr) { dlgpr->ClearHistoryTextView(); } /** * 发送消息. * @param dlgpr 对话框类 */ void DialogBase::SendMessage(DialogBase *dlgpr) { dlgpr->SendEnclosureMsg(); dlgpr->SendTextMsg(); dlgpr->ScrollHistoryTextview(); } /** * 对话框被摧毁的回调函数 * @param dialog */ void DialogBase::DialogDestory(DialogBase *dialog) { delete dialog; } /** * 清除提示,这个提示只是窗口闪动的提示 */ gboolean DialogBase::ClearNotify(GtkWidget *window, GdkEventConfigure *event) { #if GTK_CHECK_VERSION(2,8,0) if (gtk_window_get_urgency_hint(GTK_WINDOW(window))) gtk_window_set_urgency_hint(GTK_WINDOW(window), FALSE); #endif return FALSE; } /** * 拖拽事件响应函数. * @param dlgpr 对话框类 * @param context the drag context * @param x where the drop happened * @param y where the drop happened * @param data the received data * @param info the info that has been registered with the target in the GtkTargetList * @param time the timestamp at which the data was received */ void DialogBase::DragDataReceived(DialogBase *dlgpr, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, guint info, guint time) { GtkWidget *widget; GSList *list; if (data->length <= 0 || data->format != 8) { gtk_drag_finish(context, FALSE, FALSE, time); return; } list = selection_data_get_path(data); //获取所有文件 dlgpr->AttachEnclosure(list); g_slist_foreach(list, GFunc(g_free), NULL); g_slist_free(list); widget = GTK_WIDGET(g_datalist_get_data(&dlgpr->widset, "enclosure-frame-widget")); gtk_widget_show(widget); gtk_drag_finish(context, TRUE, FALSE, time); } /** * 主对话框位置&大小改变的响应处理函数. * @param window 主窗口 * @param event the GdkEventConfigure which triggered this signal * @param dtset data set * @return Gtk+库所需 */ gboolean DialogBase::WindowConfigureEvent(GtkWidget *window, GdkEventConfigure *event, GData **dtset) { g_datalist_set_data(dtset, "window-width", GINT_TO_POINTER(event->width)); g_datalist_set_data(dtset, "window-height", GINT_TO_POINTER(event->height)); return FALSE; } /** * 分割面板的分割位置改变的响应处理函数. * @param paned paned * @param pspec he GParamSpec of the property which changed * @param dtset data set */ void DialogBase::PanedDivideChanged(GtkWidget *paned, GParamSpec *pspec, GData **dtset) { const gchar *identify; gint position; identify = (const gchar *)g_object_get_data(G_OBJECT(paned), "position-name"); position = gtk_paned_get_position(GTK_PANED(paned)); g_datalist_set_data(dtset, identify, GINT_TO_POINTER(position)); } /** *删除选定附件. * @param dlgpr 对话框类 */ void DialogBase::RemoveSelectedFromTree(GtkWidget *widget) { GList *list; GtkTreeSelection *TreeSel; GtkTreePath *path; GtkTreeModel *model; gchar *str_data; gboolean valid = 0; GtkTreeIter iter; model = gtk_tree_view_get_model(GTK_TREE_VIEW(widget)); TreeSel = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget)); list = gtk_tree_selection_get_selected_rows(TreeSel,NULL); if(!list) return; while(list) { gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, (GtkTreePath *)g_list_nth(list, 0)->data); gtk_list_store_set(GTK_LIST_STORE(model), &iter, 2,"delete", -1); list = g_list_next(list); } g_list_free(list); valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(model), &iter); path = gtk_tree_model_get_path(GTK_TREE_MODEL(model), &iter); while(valid) { gtk_tree_model_get(GTK_TREE_MODEL(model), &iter,2,&str_data,-1); if(!g_strcmp0(str_data,"delete")) gtk_list_store_remove(GTK_LIST_STORE(model),&iter); else gtk_tree_path_next(path); valid = gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, path); } } /** *显示附件的TreeView的弹出菜单回调函数. * @param widget TreeView * @param event 事件 */ gint DialogBase::EncosureTreePopup(GtkWidget *treeview,GdkEvent *event) { GtkWidget *menu,*menuitem; GdkEventButton *event_button; menu = gtk_menu_new(); menuitem = gtk_menu_item_new_with_label(_("Remove Selected")); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(RemoveSelectedEnclosure), treeview); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); if (event->type == GDK_BUTTON_PRESS) { event_button = (GdkEventButton *) event; if (event_button->button == 3) { gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, event_button->button, event_button->time); gtk_widget_show(menuitem); return TRUE; } } return FALSE; } /** *从显示附件的TreeView删除选定行. * @param widget TreeView */ void DialogBase::RemoveSelectedEnclosure(GtkWidget *widget) { GtkTreeModel *model; GtkTreeSelection *TreeSel; GtkTreeIter iter; FileInfo *file; DialogBase *dlg; GList *list; dlg = (DialogBase *)(g_object_get_data(G_OBJECT(widget),"dialog")); model = gtk_tree_view_get_model(GTK_TREE_VIEW(widget)); //从中心结点删除 TreeSel = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget)); list = gtk_tree_selection_get_selected_rows(TreeSel,NULL); if(!list) return; while(list) { gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, (GtkTreePath *)g_list_nth(list, 0)->data); gtk_tree_model_get(model, &iter,4,&file, -1); dlg->totalsendsize -= file->filesize; cthrd.DelFileFromPrivate(file->fileid); list = g_list_next(list); } g_list_free(list); //从列表中删除 RemoveSelectedFromTree(widget); //重新计算待发送文件大小 dlg->UpdateFileSendUI(dlg); } /** * 创建文件发送区域. * @return 主窗体 */ GtkWidget *DialogBase::CreateFileSendArea() { GtkWidget *frame, *hbox, *vbox, *button ,*pbar, *sw, *treeview; GtkTreeModel *model; frame = gtk_frame_new(_("File to send.")); g_datalist_set_data(&widset, "file-send-frame-widget", frame); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); pbar = gtk_progress_bar_new(); g_datalist_set_data(&widset, "file-send-progress-bar-widget", pbar); gtk_progress_bar_set_text(GTK_PROGRESS_BAR(pbar),_("Sending progress.")); hbox = gtk_hbox_new(FALSE,1); gtk_box_pack_start(GTK_BOX(hbox),pbar,TRUE,TRUE,0); button = gtk_button_new_with_label(_("Dirs")); gtk_box_pack_start(GTK_BOX(hbox),button,FALSE,TRUE,0); g_signal_connect_swapped(button, "clicked", G_CALLBACK(AttachFolder), this); button = gtk_button_new_with_label(_("Files")); gtk_box_pack_start(GTK_BOX(hbox),button,FALSE,TRUE,0); g_signal_connect_swapped(button, "clicked", G_CALLBACK(AttachRegular), this); button = gtk_button_new_with_label(_("Detail")); gtk_box_pack_end(GTK_BOX(hbox),button,FALSE,TRUE,0); g_signal_connect_swapped(button, "clicked", G_CALLBACK(OpenTransDlg), NULL); vbox = gtk_vbox_new(FALSE,0); gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0); sw = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); model = CreateFileSendModel(); treeview = CreateFileSendTree(model); g_datalist_set_data_full(&mdlset, "enclosure-model", model, GDestroyNotify(g_object_unref)); g_datalist_set_data(&widset, "file-send-treeview-widget", treeview); //保存this指针,在后面消息响应函数中用到 g_object_set_data(G_OBJECT(treeview), "dialog", this); gtk_container_add(GTK_CONTAINER(sw), treeview); gtk_box_pack_end(GTK_BOX(vbox),sw,TRUE,TRUE,0); gtk_container_add(GTK_CONTAINER(frame), vbox); return frame; } /** * 创建待发送文件树(FileSend-tree). * @param model FileSend-model * @return 待发送文件树 */ GtkWidget *DialogBase::CreateFileSendTree(GtkTreeModel *model) { GtkWidget *view; GtkTreeSelection *selection; GtkCellRenderer *cell; GtkTreeViewColumn *column; view = gtk_tree_view_new_with_model(model); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(view), TRUE); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(view)); gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE); cell = gtk_cell_renderer_pixbuf_new(); column = gtk_tree_view_column_new_with_attributes("",cell,"pixbuf",0,NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); if(grpinf->type != GROUP_BELONG_TYPE_REGULAR) { cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("PeelName"),cell,"text",5,NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); } cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Name"),cell,"text",1,NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Size"),cell,"text",2,NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Path"),cell,"text",3,NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); g_signal_connect_swapped(GTK_OBJECT(view), "button_press_event", G_CALLBACK(EncosureTreePopup), view); return view; } /** * 创建待发送文件树底层数据结构. * @return FileSend-model * 0:图标 1:文件名 2:大小(string) 3:全文件名 4:文件信息(指针) 5:接收者 * 没有专门加删除标记,用第2列作删除标记,(某行反正要删除,改就改了) */ GtkTreeModel *DialogBase::CreateFileSendModel() { GtkListStore *model; model = gtk_list_store_new(6, GDK_TYPE_PIXBUF,G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER,G_TYPE_STRING); return GTK_TREE_MODEL(model); } /** * 更新本窗口文件发送UI. * @param treeview FileSend-treeview * @return FileSend-model * 让传输聊天窗口从传输状态窗口去取数据,而没有让文件数据发送类把数据传送到聊天窗口, * 这是因为考虑数据要发到本窗口,会存在窗口未打开或群聊状态等不确定因素,处理过程太复杂 */ gboolean DialogBase::UpdateFileSendUI(DialogBase *dlggrp) { GtkTreeModel *model; GtkTreeIter iter; char progresstip[MAX_BUFLEN]; GtkTreeView *treeview; GtkWidget *pbar; float progress; int64_t sentsize; GtkIconTheme *theme; GdkPixbuf *pixbuf; const char *statusfile; FileInfo *file; theme = gtk_icon_theme_get_default(); statusfile = "tip-finish"; pixbuf = gtk_icon_theme_load_icon(theme, statusfile, MAX_ICONSIZE, GtkIconLookupFlags(0), NULL); treeview = GTK_TREE_VIEW(g_datalist_get_data(&(dlggrp->widset), "file-send-treeview-widget")); model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); sentsize =0; if(gtk_tree_model_get_iter_first(model, &iter)) { do { //遍历待发送model gtk_tree_model_get(model, &iter,4,&file, -1); if(pixbuf && (file->finishedsize == file->filesize)) gtk_list_store_set(GTK_LIST_STORE(model), &iter,0,pixbuf,-1); sentsize += file->finishedsize; } while (gtk_tree_model_iter_next(model, &iter)); } /* 调整进度显示UI */ gtk_tree_view_columns_autosize(GTK_TREE_VIEW(treeview)); pbar = GTK_WIDGET(g_datalist_get_data(&(dlggrp->widset), "file-send-progress-bar-widget")); if(dlggrp->totalsendsize == 0) { progress = 0; snprintf(progresstip, MAX_BUFLEN,_("Sending Progress.")); } else { progress = percent(sentsize,dlggrp->totalsendsize)/100; snprintf(progresstip, MAX_BUFLEN,_("%s Of %s Sent."), numeric_to_size(sentsize),numeric_to_size(dlggrp->totalsendsize)); } if(progress == 1){ g_source_remove(dlggrp->timersend); gtk_list_store_clear(GTK_LIST_STORE(model)); snprintf(progresstip, MAX_BUFLEN,_("Mission Completed!")); } gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(pbar),progress); gtk_progress_bar_set_text(GTK_PROGRESS_BAR(pbar),_(progresstip)); return TRUE; } /** * 打开文件传输窗口. * @param dlgpr 对话框类 */ void DialogBase::OpenTransDlg(DialogBase *dlgpr) { mwin.OpenTransWindow(); } iptux-0.6.3/src/DialogBase.h000066400000000000000000000062711257720006400156340ustar00rootroot00000000000000// // C++ Interface: DialogBase // // Description: // 这个类是DialogPeer和DialogGroup的相同部分。尽量把相同的部分放在一起。 // // Author: // Author: cwll ,(C) 2012.02 // Jiejing.Zhang , (C) 2010 // Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef DIALOGBASE_H #define DIALOGBASE_H #include "mess.h" class DialogBase: public SessionAbstract { public: DialogBase(GroupInfo *grp); virtual ~DialogBase(); protected: void InitSublayerGeneral(); void ClearSublayerGeneral(); void ClearHistoryTextView(); void ScrollHistoryTextview(); virtual void OnNewMessageComing(); void NotifyUser(); void AttachEnclosure(const GSList *list); /* UI general */ GtkWidget *CreateInputArea(); virtual GtkWidget *CreateHistoryArea(); virtual GtkWidget *CreateFileMenu(); virtual GtkWidget *CreateHelpMenu(); virtual GtkWidget *CreateFileSendArea(); virtual GtkWidget *CreateFileSendTree(GtkTreeModel *model); virtual GSList *GetSelPal(){ return NULL;}; void MainWindowSignalSetup(GtkWidget *window); GtkTreeModel *CreateFileSendModel(); GSList *PickEnclosure(uint32_t fileattr); bool SendEnclosureMsg(); virtual bool SendTextMsg() = 0; /* TODO: Group SendTextMsg need add Picture */ void FeedbackMsg(const gchar *msg); virtual void BroadcastEnclosureMsg(GSList *list) {}; // 回调部分 static void DialogDestory(DialogBase *); static gboolean ClearNotify(GtkWidget *window, GdkEventConfigure *event); static void DragDataReceived(DialogBase *dlgpr, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, guint info, guint time); static void AttachRegular(DialogBase *dlgpr); static void AttachFolder(DialogBase *dlgpr); static void RemoveSelectedFromTree(GtkWidget *widget); static void ClearHistoryBuffer(DialogBase *dlgpr); static void SendMessage(DialogBase *dlggrp); static gboolean WindowConfigureEvent(GtkWidget *window, GdkEventConfigure *event, GData **dtset); static void PanedDivideChanged(GtkWidget *paned, GParamSpec *pspec, GData **dtset); static gint EncosureTreePopup(GtkWidget *widget,GdkEvent *event); static gboolean UpdateFileSendUI(DialogBase *dlggrp); static void RemoveSelectedEnclosure(GtkWidget *widget); static void OpenTransDlg(DialogBase *dlgpr); protected: GData *widset; //窗体集 GData *mdlset; //数据model集 GData *dtset; //通用数据集 GtkAccelGroup *accel; //快捷键组 GroupInfo *grpinf; //群组信息 int64_t totalsendsize; //总计待发送大小(包括已发送) struct timeval lasktime; //上一次更新UI的时间 guint timersend; // 发送文件界面更新计时器ID }; #endif iptux-0.6.3/src/DialogGroup.cpp000077500000000000000000000726211257720006400164160ustar00rootroot00000000000000// // C++ Implementation: DialogGroup // // Description: // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #include "DialogGroup.h" #include "DialogPeer.h" #include "ProgramData.h" #include "CoreThread.h" #include "MainWindow.h" #include "LogSystem.h" #include "Command.h" #include "SendFile.h" #include "HelpDialog.h" #include "callback.h" #include "output.h" #include "support.h" #include "utils.h" extern ProgramData progdt; extern CoreThread cthrd; extern MainWindow mwin; extern LogSystem lgsys; /** * 类构造函数. * @param grp 群组信息 */ DialogGroup::DialogGroup(GroupInfo *grp) :DialogBase(grp) { InitSublayerSpecify(); ReadUILayout(); } /** * 类析构函数. */ DialogGroup::~DialogGroup() { SaveUILayout(); } /** * 群组对话框入口. * @param grpinf 群组信息 */ void DialogGroup::GroupDialogEntry(GroupInfo *grpinf) { DialogGroup *dlggrp; GtkWidget *window, *widget; dlggrp = new DialogGroup(grpinf); window = dlggrp->CreateMainWindow(); gtk_container_add(GTK_CONTAINER(window), dlggrp->CreateAllArea()); gtk_widget_show_all(window); /* 将焦点置于文本输入框 */ widget = GTK_WIDGET(g_datalist_get_data(&dlggrp->widset, "input-textview-widget")); gtk_widget_grab_focus(widget); /* 从消息队列中移除 */ pthread_mutex_lock(cthrd.GetMutex()); if (cthrd.MsglineContainItem(grpinf)) { mwin.MakeItemBlinking(grpinf, FALSE); cthrd.PopItemFromMsgline(grpinf); } pthread_mutex_unlock(cthrd.GetMutex()); /* delete dlggrp;//请不要这样做,此类将会在窗口被摧毁后自动释放 */ } /** * 更新群组成员树(member-tree)指定项. * @param pal class PalInfo */ void DialogGroup::UpdatePalData(PalInfo *pal) { GtkIconTheme *theme; GdkPixbuf *pixbuf; GtkWidget *widget; GtkTreeModel *model; GtkTreeIter iter; gpointer data; gchar *file; /* 查询项所在的位置,若没有则添加 */ widget = GTK_WIDGET(g_datalist_get_data(&widset, "member-treeview-widget")); model = gtk_tree_view_get_model(GTK_TREE_VIEW(widget)); data = NULL; //防止可能出现的(data == pal) if (gtk_tree_model_get_iter_first(model, &iter)) { do { gtk_tree_model_get(model, &iter, 3, &data, -1); if (data == pal) break; } while (gtk_tree_model_iter_next(model, &iter)); } if (data != pal) { gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, FALSE, 3, pal, -1); } /* 更新数据 */ theme = gtk_icon_theme_get_default(); file = iptux_erase_filename_suffix(pal->iconfile); pixbuf = gtk_icon_theme_load_icon(theme, file, MAX_ICONSIZE, GtkIconLookupFlags(0), NULL); g_free(file); gtk_list_store_set(GTK_LIST_STORE(model), &iter, 1, pixbuf, 2, pal->name, -1); if (pixbuf) g_object_unref(pixbuf); } /** * 插入项到群组成员树(member-tree). * @param pal class PalInfo */ void DialogGroup::InsertPalData(PalInfo *pal) { GtkIconTheme *theme; GdkPixbuf *pixbuf; GtkWidget *widget; GtkTreeModel *model; GtkTreeIter iter; gchar *file; theme = gtk_icon_theme_get_default(); file = iptux_erase_filename_suffix(pal->iconfile); pixbuf = gtk_icon_theme_load_icon(theme, file, MAX_ICONSIZE, GtkIconLookupFlags(0), NULL); g_free(file); widget = GTK_WIDGET(g_datalist_get_data(&widset, "member-treeview-widget")); model = gtk_tree_view_get_model(GTK_TREE_VIEW(widget)); gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, FALSE, 1, pixbuf, 2, pal->name, 3, pal, -1); if (pixbuf) g_object_unref(pixbuf); } /** * 从群组成员树(member-tree)删除指定项. * @param pal class PalInfo */ void DialogGroup::DelPalData(PalInfo *pal) { GtkWidget *widget; GtkTreeModel *model; GtkTreeIter iter; gpointer data; widget = GTK_WIDGET(g_datalist_get_data(&widset, "member-treeview-widget")); model = gtk_tree_view_get_model(GTK_TREE_VIEW(widget)); if (gtk_tree_model_get_iter_first(model, &iter)) { do { gtk_tree_model_get(model, &iter, 3, &data, -1); if (data == pal) { gtk_list_store_remove(GTK_LIST_STORE(model), &iter); break; } } while (gtk_tree_model_iter_next(model, &iter)); } } /** * 清除本群组所有好友数据. */ void DialogGroup::ClearAllPalData() { GtkWidget *widget; GtkTreeModel *model; widget = GTK_WIDGET(g_datalist_get_data(&widset, "member-treeview-widget")); model = gtk_tree_view_get_model(GTK_TREE_VIEW(widget)); gtk_list_store_clear(GTK_LIST_STORE(model)); } /** * 初始化底层数据. */ void DialogGroup::InitSublayerSpecify() { GtkTreeModel *model; model = CreateMemberModel(); g_datalist_set_data_full(&mdlset, "member-model", model, GDestroyNotify(g_object_unref)); FillMemberModel(model); } /** * 读取对话框的UI布局数据. */ void DialogGroup::ReadUILayout() { GConfClient *client; gint numeric; client = gconf_client_get_default(); numeric = gconf_client_get_int(client, GCONF_PATH "/group_window_width", NULL); numeric = numeric ? numeric : 550; g_datalist_set_data(&dtset, "window-width", GINT_TO_POINTER(numeric)); numeric = gconf_client_get_int(client, GCONF_PATH "/group_window_height", NULL); numeric = numeric ? numeric : 500; g_datalist_set_data(&dtset, "window-height", GINT_TO_POINTER(numeric)); numeric = gconf_client_get_int(client, GCONF_PATH "/group_main_paned_divide", NULL); numeric = numeric ? numeric : 150; g_datalist_set_data(&dtset, "main-paned-divide", GINT_TO_POINTER(numeric)); numeric = gconf_client_get_int(client, GCONF_PATH "/group_historyinput_paned_divide", NULL); numeric = numeric ? numeric : 320; g_datalist_set_data(&dtset, "historyinput-paned-divide", GINT_TO_POINTER(numeric)); numeric = gconf_client_get_int(client, GCONF_PATH "/group_memberenclosure_paned_divide", NULL); numeric = numeric ? numeric : 320; g_datalist_set_data(&dtset, "memberenclosure-paned-divide", GINT_TO_POINTER(numeric)); g_object_unref(client); } /** * 写出对话框的UI布局数据. */ void DialogGroup::SaveUILayout() { GConfClient *client; gint numeric; client = gconf_client_get_default(); numeric = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "window-width")); gconf_client_set_int(client, GCONF_PATH "/group_window_width", numeric, NULL); numeric = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "window-height")); gconf_client_set_int(client, GCONF_PATH "/group_window_height", numeric, NULL); numeric = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "main-paned-divide")); gconf_client_set_int(client, GCONF_PATH "/group_main_paned_divide", numeric, NULL); numeric = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "historyinput-paned-divide")); gconf_client_set_int(client, GCONF_PATH "/group_historyinput_paned_divide", numeric, NULL); numeric = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "memberenclosure-paned-divide")); gconf_client_set_int(client, GCONF_PATH "/group_memberenclosure_paned_divide", numeric, NULL); g_object_unref(client); } /** * 创建主窗口. * @return 窗口 */ GtkWidget *DialogGroup::CreateMainWindow() { char buf[MAX_BUFLEN]; GtkWidget *window; gint width, height; window = gtk_window_new(GTK_WINDOW_TOPLEVEL); snprintf(buf, MAX_BUFLEN, _("Talk with the group %s"), grpinf->name); gtk_window_set_title(GTK_WINDOW(window), buf); width = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "window-width")); height = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "window-height")); gtk_window_set_default_size(GTK_WINDOW(window), width, height); gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER); gtk_window_add_accel_group(GTK_WINDOW(window), accel); g_datalist_set_data(&widset, "window-widget", window); widget_enable_dnd_uri(window); grpinf->dialog = window; MainWindowSignalSetup(window); return window; } /** * 创建所有区域. * @return 主窗体 */ GtkWidget *DialogGroup::CreateAllArea() { GtkWidget *box; GtkWidget *hpaned, *vpaned; gint position; box = gtk_vbox_new(FALSE, 0); /* 加入菜单条 */ gtk_box_pack_start(GTK_BOX(box), CreateMenuBar(), FALSE, FALSE, 0); /* 加入主区域 */ hpaned = gtk_hpaned_new(); g_object_set_data(G_OBJECT(hpaned), "position-name", (gpointer)"main-paned-divide"); position = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "main-paned-divide")); gtk_paned_set_position(GTK_PANED(hpaned), position); gtk_box_pack_start(GTK_BOX(box), hpaned, TRUE, TRUE, 0); g_signal_connect(hpaned, "notify::position", G_CALLBACK(PanedDivideChanged), &dtset); /*/* 加入组成员&附件区域 */ vpaned = gtk_vpaned_new(); g_object_set_data(G_OBJECT(vpaned), "position-name", (gpointer)"memberenclosure-paned-divide"); position = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "memberenclosure-paned-divide")); gtk_paned_set_position(GTK_PANED(vpaned), position); gtk_paned_pack1(GTK_PANED(hpaned), vpaned, FALSE, TRUE); g_signal_connect(vpaned, "notify::position", G_CALLBACK(PanedDivideChanged), &dtset); gtk_paned_pack1(GTK_PANED(vpaned), CreateMemberArea(), TRUE, TRUE); gtk_paned_pack2(GTK_PANED(vpaned), CreateFileSendArea(), FALSE, TRUE); /*/* 加入聊天历史记录&输入区域 */ vpaned = gtk_vpaned_new(); g_object_set_data(G_OBJECT(vpaned), "position-name", (gpointer)"historyinput-paned-divide"); position = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "historyinput-paned-divide")); gtk_paned_set_position(GTK_PANED(vpaned), position); gtk_paned_pack2(GTK_PANED(hpaned), vpaned, TRUE, TRUE); g_signal_connect(vpaned, "notify::position", G_CALLBACK(PanedDivideChanged), &dtset); gtk_paned_pack1(GTK_PANED(vpaned), CreateHistoryArea(), TRUE, TRUE); gtk_paned_pack2(GTK_PANED(vpaned), DialogBase::CreateInputArea(), FALSE, TRUE); return box; } /** * 创建菜单条. * @return 菜单条 */ GtkWidget *DialogGroup::CreateMenuBar() { GtkWidget *menubar; menubar = gtk_menu_bar_new(); gtk_menu_shell_append(GTK_MENU_SHELL(menubar), CreateFileMenu()); gtk_menu_shell_append(GTK_MENU_SHELL(menubar), CreateToolMenu()); gtk_menu_shell_append(GTK_MENU_SHELL(menubar), CreateHelpMenu()); return menubar; } /** * 创建组成员区域. * @return 主窗体 */ GtkWidget *DialogGroup::CreateMemberArea() { GtkWidget *frame, *sw; GtkWidget *widget; GtkTreeModel *model; frame = gtk_frame_new(_("Member")); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); sw = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_container_add(GTK_CONTAINER(frame), sw); model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "member-model")); widget = CreateMemberTree(model); gtk_container_add(GTK_CONTAINER(sw), widget); g_signal_connect(widget, "button-press-event", G_CALLBACK(PopupPickMenu), NULL); g_signal_connect(widget, "row-activated", G_CALLBACK(MembertreeItemActivated), NULL); g_datalist_set_data(&widset, "member-treeview-widget", widget); return frame; } /** * 群组成员树(member-tree)底层数据结构. * 4,0 toggled,1 icon,2 nickname,3 data \n * 是否被选中;好友头像;好友昵称;好友数据 \n * @return member-model */ GtkTreeModel *DialogGroup::CreateMemberModel() { GtkListStore *model; model = gtk_list_store_new(4, G_TYPE_BOOLEAN, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_POINTER); gtk_tree_sortable_set_default_sort_func(GTK_TREE_SORTABLE(model), GtkTreeIterCompareFunc(MemberTreeCompareByNameFunc), NULL, NULL); gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(model), GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, GTK_SORT_ASCENDING); return GTK_TREE_MODEL(model); } /** * 为群组成员树(member-tree)填充底层数据. * @param model member-model */ void DialogGroup::FillMemberModel(GtkTreeModel *model) { GtkIconTheme *theme; GdkPixbuf *pixbuf; GtkTreeIter iter; GSList *tlist; PalInfo *pal; char *file; theme = gtk_icon_theme_get_default(); pthread_mutex_lock(cthrd.GetMutex()); tlist = grpinf->member; while (tlist) { pal = (PalInfo *)tlist->data; file = iptux_erase_filename_suffix(pal->iconfile); pixbuf = gtk_icon_theme_load_icon(theme, file, MAX_ICONSIZE, GtkIconLookupFlags(0), NULL); g_free(file); gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, TRUE, 1, pixbuf, 2, pal->name, 3, pal, -1); if (pixbuf) g_object_unref(pixbuf); tlist = g_slist_next(tlist); } pthread_mutex_unlock(cthrd.GetMutex()); } /** * 创建群组成员树(member-tree). * @param model member-model * @return 群组树 */ GtkWidget *DialogGroup::CreateMemberTree(GtkTreeModel *model) { GtkWidget *view; GtkTreeSelection *selection; GtkCellRenderer *cell; GtkTreeViewColumn *column; view = gtk_tree_view_new_with_model(model); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(view), TRUE); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(view)); gtk_tree_selection_set_mode(selection, GTK_SELECTION_NONE); cell = gtk_cell_renderer_toggle_new(); g_signal_connect_swapped(cell, "toggled", G_CALLBACK(model_turn_select), model); column = gtk_tree_view_column_new_with_attributes(_("Send"), cell, "active", 0, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); column = gtk_tree_view_column_new(); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_column_set_title(column, _("Pals")); cell = gtk_cell_renderer_pixbuf_new(); gtk_tree_view_column_pack_start(column, cell, FALSE); gtk_tree_view_column_set_attributes(column, cell, "pixbuf", 1, NULL); cell = gtk_cell_renderer_text_new(); gtk_tree_view_column_pack_start(column, cell, FALSE); gtk_tree_view_column_set_attributes(column, cell, "text", 2, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); return view; } /** * 创建工具菜单. * @return 菜单 */ GtkWidget *DialogGroup::CreateToolMenu() { GtkWidget *menushell; GtkWidget *menu, *submenu, *menuitem; GtkTreeModel *model; model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "member-model")); menushell = gtk_menu_item_new_with_mnemonic(_("_Tools")); menu = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menushell), menu); /* 清空历史缓冲区 */ NO_OPERATION_C menuitem = gtk_menu_item_new_with_label(_("Clear Buffer")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(ClearHistoryBuffer), this); /* 群组成员排序 */ NO_OPERATION_C menuitem = gtk_menu_item_new_with_label(_("Sort")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); submenu = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), submenu); /*/* 按昵称排序 */ NO_OPERATION_C menuitem = gtk_radio_menu_item_new_with_label(NULL, _("By Nickname")); g_object_set_data(G_OBJECT(menuitem), "compare-func", (gpointer)MemberTreeCompareByNameFunc); gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menuitem); g_signal_connect(menuitem, "toggled", G_CALLBACK(SetMemberTreeSortFunc), model); /*/* 按IP地址排序 */ menuitem = gtk_radio_menu_item_new_with_label_from_widget( GTK_RADIO_MENU_ITEM(menuitem), _("By IP")); g_object_set_data(G_OBJECT(menuitem), "compare-func", (gpointer)MemberTreeCompareByIPFunc); gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menuitem); g_signal_connect(menuitem, "toggled", G_CALLBACK(SetMemberTreeSortFunc), model); /*/* 分割符 */ menuitem = gtk_separator_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menuitem); /*/* 升序 */ NO_OPERATION_C menuitem = gtk_radio_menu_item_new_with_label(NULL, _("Ascending")); g_object_set_data(G_OBJECT(menuitem), "sort-type", GINT_TO_POINTER(GTK_SORT_ASCENDING)); gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menuitem); g_signal_connect(menuitem, "toggled", G_CALLBACK(SetMemberTreeSortType), model); /*/* 降序 */ menuitem = gtk_radio_menu_item_new_with_label_from_widget( GTK_RADIO_MENU_ITEM(menuitem), _("Descending")); g_object_set_data(G_OBJECT(menuitem), "sort-type", GINT_TO_POINTER(GTK_SORT_DESCENDING)); gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menuitem); g_signal_connect(menuitem, "toggled", G_CALLBACK(SetMemberTreeSortType), model); return menushell; } /** * 向选中的好友广播附件消息. * @param list 文件链表 */ void DialogGroup::BroadcastEnclosureMsg(GSList *list) { SendFile sfile; GtkWidget *widget; GtkTreeModel *model; GtkTreeIter iter; gboolean active; PalInfo *pal; GSList *plist; /* 考察是否有成员 */ widget = GTK_WIDGET(g_datalist_get_data(&widset, "member-treeview-widget")); model = gtk_tree_view_get_model(GTK_TREE_VIEW(widget)); if (!gtk_tree_model_get_iter_first(model, &iter)) { /** * @note 链表(list)的数据本来应该由(sfile.BcstFileInfoEntry())接手的, * 既然已经没有那个机会了, 当然就只好在这儿手动释放了. */ g_slist_foreach(list, GFunc(g_free), NULL); return; } /* 向选中的成员发送附件 */ plist = NULL; do { gtk_tree_model_get(model, &iter, 0, &active, 3, &pal, -1); if (active) plist = g_slist_append(plist, pal); } while (gtk_tree_model_iter_next(model, &iter)); sfile.BcstFileInfoEntry(plist, list); g_slist_free(plist); } /** * 向选中的好友广播文本消息. * @param msg 文本消息 */ void DialogGroup::BroadcastTextMsg(const gchar *msg) { Command cmd; GtkWidget *widget; GtkTreeModel *model; GtkTreeIter iter; gboolean active; uint32_t opttype; PalInfo *pal; /* 考察是否有成员 */ widget = GTK_WIDGET(g_datalist_get_data(&widset, "member-treeview-widget")); model = gtk_tree_view_get_model(GTK_TREE_VIEW(widget)); if (!gtk_tree_model_get_iter_first(model, &iter)) return; /* 向选中的成员发送数据 */ do { gtk_tree_model_get(model, &iter, 0, &active, 3, &pal, -1); if (active) { if (FLAG_ISSET(pal->flags, 0)) { switch (grpinf->type) { case GROUP_BELONG_TYPE_BROADCAST: opttype = IPTUX_BROADCASTOPT; break; case GROUP_BELONG_TYPE_GROUP: opttype = IPTUX_GROUPOPT; break; case GROUP_BELONG_TYPE_SEGMENT: opttype = IPTUX_SEGMENTOPT; break; case GROUP_BELONG_TYPE_REGULAR: default: opttype = IPTUX_REGULAROPT; break; } cmd.SendUnitMsg(cthrd.UdpSockQuote(), pal, opttype, msg); } else cmd.SendGroupMsg(cthrd.UdpSockQuote(), pal, msg); } } while (gtk_tree_model_iter_next(model, &iter)); } /** * 创建选择项的弹出菜单. * @param model model * @return 菜单 */ GtkWidget *DialogGroup::CreatePopupMenu(GtkTreeModel *model) { GtkWidget *menu, *menuitem; menu = gtk_menu_new(); menuitem = gtk_menu_item_new_with_label(_("Select All")); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(model_select_all), model); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); menuitem = gtk_menu_item_new_with_label(_("Reverse Select")); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(model_turn_all), model); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); menuitem = gtk_menu_item_new_with_label(_("Clear Up")); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(model_clear_all), model); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); return menu; } /** * 群组成员树(member-tree)按昵称排序的比较函数. * @param model member-model * @param a A GtkTreeIter in model * @param b Another GtkTreeIter in model * @return 比较值 */ gint DialogGroup::MemberTreeCompareByNameFunc(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b) { PalInfo *apal, *bpal; gint result; gtk_tree_model_get(model, a, 3, &apal, -1); gtk_tree_model_get(model, b, 3, &bpal, -1); result = strcmp(apal->name, bpal->name); return result; } /** * 群组成员树(member-tree)按IP排序的比较函数. * @param model member-model * @param a A GtkTreeIter in model * @param b Another GtkTreeIter in model * @return 比较值 */ gint DialogGroup::MemberTreeCompareByIPFunc(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b) { PalInfo *apal, *bpal; gint result; gtk_tree_model_get(model, a, 3, &apal, -1); gtk_tree_model_get(model, b, 3, &bpal, -1); result = ntohl(apal->ipv4) - ntohl(bpal->ipv4); return result; } /** * 设置群组成员树(member-tree)的比较函数. * @param menuitem radio-menu-item * @param model member-model */ void DialogGroup::SetMemberTreeSortFunc(GtkWidget *menuitem, GtkTreeModel *model) { GtkTreeIterCompareFunc func; if (!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem))) return; func = (GtkTreeIterCompareFunc)(g_object_get_data(G_OBJECT(menuitem), "compare-func")); gtk_tree_sortable_set_default_sort_func(GTK_TREE_SORTABLE(model), func, NULL, NULL); } /** * 设置群组成员树(member-tree)的排序方式. * @param menuitem radio-menu-item * @param model member-model */ void DialogGroup::SetMemberTreeSortType(GtkWidget *menuitem, GtkTreeModel *model) { GtkSortType type; if (!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem))) return; type = (GtkSortType)GPOINTER_TO_INT(g_object_get_data(G_OBJECT(menuitem), "sort-type")); gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(model), GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, type); } /** * 弹出选择项的菜单. * @param treeview tree-view * @param event event * @return Gtk+库所需 */ gboolean DialogGroup::PopupPickMenu(GtkWidget *treeview, GdkEventButton *event) { GtkWidget *menu; GtkTreeModel *model; if (event->button != 3) return FALSE; model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); menu = CreatePopupMenu(model); gtk_widget_show_all(menu); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, event->button, event->time); return TRUE; } /** * 群组成员树(member-tree)项被激活. * @param treeview tree-view * @param path path * @param column column */ void DialogGroup::MembertreeItemActivated(GtkWidget *treeview, GtkTreePath *path, GtkTreeViewColumn *column) { GtkTreeModel *model; GtkTreeIter iter; PalInfo *pal; GroupInfo *grpinf; model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(model, &iter, 3, &pal, -1); if ( (grpinf = cthrd.GetPalRegularItem(pal))) { if ( (grpinf->dialog)) gtk_window_present(GTK_WINDOW(grpinf->dialog)); else DialogPeer::PeerDialogEntry(grpinf); } } bool DialogGroup::SendTextMsg() { GtkWidget *textview; GtkTextBuffer *buffer; GtkTextIter start, end; MsgPara msgpara; gchar *msg; /* 考察缓冲区内是否存在数据 */ textview = GTK_WIDGET(g_datalist_get_data(&widset, "input-textview-widget")); gtk_widget_grab_focus(textview); //为下一次任务做准备 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview)); gtk_text_buffer_get_bounds(buffer, &start, &end); if (gtk_text_iter_equal(&start, &end)) return false; /* 获取数据并发送 */ msg = gtk_text_buffer_get_text(buffer, &start, &end, FALSE); gtk_text_buffer_delete(buffer, &start, &end); FeedbackMsg(msg); BroadcastTextMsg(msg); msgpara.stype = MESSAGE_SOURCE_TYPE_SELF; msgpara.pal = NULL; lgsys.CommunicateLog(&msgpara, "[STRING]%s", msg); g_free(msg); return true; } /** * 发送消息. * @param dlggrp 对话框类 */ void DialogGroup::SendMessage(DialogGroup *dlggrp) { dlggrp->SendEnclosureMsg(); dlggrp->SendTextMsg(); } /** * 获取待发送成员列表. * @return plist 获取待发送成员列表 * 调用该函数后须free plist */ GSList *DialogGroup::GetSelPal() { GtkWidget *widget; GtkTreeModel *model; GtkTreeIter iter; gboolean active; PalInfo *pal; GSList *plist; /* 考察是否有成员 */ widget = GTK_WIDGET(g_datalist_get_data(&widset, "member-treeview-widget")); model = gtk_tree_view_get_model(GTK_TREE_VIEW(widget)); if (!gtk_tree_model_get_iter_first(model, &iter)) return NULL; plist = NULL; do { gtk_tree_model_get(model, &iter, 0, &active, 3, &pal, -1); if (active) plist = g_slist_append(plist, pal); } while (gtk_tree_model_iter_next(model, &iter)); return plist; } iptux-0.6.3/src/DialogGroup.h000077500000000000000000000045441257720006400160620ustar00rootroot00000000000000// // C++ Interface: DialogGroup // // Description: // 与多人对话 // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef DIALOGGROUP_H #define DIALOGGROUP_H #include "mess.h" #include "DialogBase.h" class DialogGroup: public DialogBase { public: DialogGroup(GroupInfo *grp); virtual ~DialogGroup(); static void GroupDialogEntry(GroupInfo *grpinf); virtual void UpdatePalData(PalInfo *pal); virtual void InsertPalData(PalInfo *pal); virtual void DelPalData(PalInfo *pal); virtual void ClearAllPalData(); virtual GSList *GetSelPal(); private: virtual void InitSublayerSpecify(); void ReadUILayout(); void SaveUILayout(); GtkWidget *CreateMainWindow(); GtkWidget *CreateAllArea(); GtkWidget *CreateMenuBar(); GtkWidget *CreateMemberArea(); GtkWidget *CreateInputArea(); GtkWidget *CreateToolMenu(); GtkTreeModel *CreateMemberModel(); void FillMemberModel(GtkTreeModel *model); GtkWidget *CreateMemberTree(GtkTreeModel *model); bool SendTextMsg(); private: void BroadcastEnclosureMsg(GSList *list); void BroadcastTextMsg(const gchar *msg); static GtkWidget *CreatePopupMenu(GtkTreeModel *model); //回调处理部分 private: static gint MemberTreeCompareByNameFunc(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b); static gint MemberTreeCompareByIPFunc(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b); static void SetMemberTreeSortFunc(GtkWidget *menuitem, GtkTreeModel *model); static void SetMemberTreeSortType(GtkWidget *menuitem, GtkTreeModel *model); static void DragDataReceived(DialogGroup *dlggrp, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, guint info, guint time); static gboolean PopupPickMenu(GtkWidget *treeview, GdkEventButton *event); static void MembertreeItemActivated(GtkWidget *treeview, GtkTreePath *path, GtkTreeViewColumn *column); static void SendMessage(DialogGroup *dlggrp); }; #endif iptux-0.6.3/src/DialogPeer.cpp000077500000000000000000001420251257720006400162110ustar00rootroot00000000000000// // C++ Implementation: DialogPeer // // Description: // // // Author: cwll ,(C) 2012.02 // Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #include "DialogPeer.h" #include "ProgramData.h" #include "CoreThread.h" #include "MainWindow.h" #include "LogSystem.h" #include "Command.h" #include "SendFile.h" #include "RecvFileData.h" #include "HelpDialog.h" #include "output.h" #include "callback.h" #include "support.h" #include "utils.h" #include "dialog.h" extern ProgramData progdt; extern CoreThread cthrd; extern MainWindow mwin; extern LogSystem lgsys; /** * 类构造函数. * @param grp 好友群组信息 */ DialogPeer::DialogPeer(GroupInfo *grp):DialogBase(grp), torcvsize(0),rcvdsize(0) { ReadUILayout(); } /** * 类析构函数. */ DialogPeer::~DialogPeer() { /* 非常重要,必须在窗口析构之前把定时触发事件停止,不然会出现意想不到的情况 */ if(timerrcv > 0) g_source_remove(timerrcv); /*---------------------------------------------------------------*/ WriteUILayout(); } /** * 好友对话框入口. * @param grpinf 好友群组信息 */ void DialogPeer::PeerDialogEntry(GroupInfo *grpinf) { DialogPeer *dlgpr; GtkWidget *window, *widget; dlgpr = new DialogPeer(grpinf); window = dlgpr->CreateMainWindow(); gtk_container_add(GTK_CONTAINER(window), dlgpr->CreateAllArea()); gtk_widget_show_all(window); /* 将焦点置于文本输入框 */ widget = GTK_WIDGET(g_datalist_get_data(&dlgpr->widset, "input-textview-widget")); gtk_widget_grab_focus(widget); /* 从消息队列中移除 */ pthread_mutex_lock(cthrd.GetMutex()); if (cthrd.MsglineContainItem(grpinf)) { mwin.MakeItemBlinking(grpinf, FALSE); cthrd.PopItemFromMsgline(grpinf); } pthread_mutex_unlock(cthrd.GetMutex()); /* delete dlgpr;//请不要这样做,此类将会在窗口被摧毁后自动释放 */ } /** * 更新好友信息. * @param pal 好友信息 */ void DialogPeer::UpdatePalData(PalInfo *pal) { GtkWidget *textview; GtkTextBuffer *buffer; GtkTextIter start, end; textview = GTK_WIDGET(g_datalist_get_data(&widset, "info-textview-widget")); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview)); gtk_text_buffer_get_bounds(buffer, &start, &end); gtk_text_buffer_delete(buffer, &start, &end); FillPalInfoToBuffer(buffer, pal); } /** * 插入好友数据. * @param pal 好友信息 */ void DialogPeer::InsertPalData(PalInfo *pal) { //此函数暂且无须实现 } /** * 删除好友数据. * @param pal 好友信息 */ void DialogPeer::DelPalData(PalInfo *pal) { //此函数暂且无须实现 } /** * 清除本群组所有好友数据. */ void DialogPeer::ClearAllPalData() { //此函数暂且无须实现 } /** * 读取对话框的UI布局数据. */ void DialogPeer::ReadUILayout() { GConfClient *client; gint numeric; client = gconf_client_get_default(); numeric = gconf_client_get_int(client, GCONF_PATH "/peer_window_width", NULL); numeric = numeric ? numeric : 570; g_datalist_set_data(&dtset, "window-width", GINT_TO_POINTER(numeric)); numeric = gconf_client_get_int(client, GCONF_PATH "/peer_window_height", NULL); numeric = numeric ? numeric : 420; g_datalist_set_data(&dtset, "window-height", GINT_TO_POINTER(numeric)); numeric = gconf_client_get_int(client, GCONF_PATH "/peer_main_paned_divide", NULL); numeric = numeric ? numeric : 375; g_datalist_set_data(&dtset, "main-paned-divide", GINT_TO_POINTER(numeric)); numeric = gconf_client_get_int(client, GCONF_PATH "/peer_historyinput_paned_divide", NULL); numeric = numeric ? numeric : 255; g_datalist_set_data(&dtset, "historyinput-paned-divide", GINT_TO_POINTER(numeric)); numeric = gconf_client_get_int(client, GCONF_PATH "/peer_infoenclosure_paned_divide", NULL); numeric = numeric ? numeric : 255; g_datalist_set_data(&dtset, "infoenclosure-paned-divide", GINT_TO_POINTER(numeric)); numeric = gconf_client_get_int(client, GCONF_PATH "/peer_enclosure_paned_divide", NULL); numeric = numeric ? numeric : 280; g_datalist_set_data(&dtset, "enclosure-paned-divide", GINT_TO_POINTER(numeric)); numeric = gconf_client_get_int(client, GCONF_PATH "/peer_file_recieve_paned_divide", NULL); numeric = numeric ? numeric : 140; g_datalist_set_data(&dtset, "file-receive-paned-divide", GINT_TO_POINTER(numeric)); g_object_unref(client); } /** * 保存对话框的UI布局数据. */ void DialogPeer::WriteUILayout() { GConfClient *client; gint numeric; client = gconf_client_get_default(); numeric = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "window-width")); gconf_client_set_int(client, GCONF_PATH "/peer_window_width", numeric, NULL); numeric = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "window-height")); gconf_client_set_int(client, GCONF_PATH "/peer_window_height", numeric, NULL); numeric = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "main-paned-divide")); gconf_client_set_int(client, GCONF_PATH "/peer_main_paned_divide", numeric, NULL); numeric = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "historyinput-paned-divide")); gconf_client_set_int(client, GCONF_PATH "/peer_historyinput_paned_divide", numeric, NULL); numeric = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "infoenclosure-paned-divide")); gconf_client_set_int(client, GCONF_PATH "/peer_infoenclosure_paned_divide", numeric, NULL); numeric = GPOINTER_TO_INT(g_datalist_get_data(&dtset,"enclosure-paned-divide")); gconf_client_set_int(client, GCONF_PATH "/peer_enclosure_paned_divide", numeric, NULL); numeric = GPOINTER_TO_INT(g_datalist_get_data(&dtset,"file-receive-paned-divide")); gconf_client_set_int(client, GCONF_PATH "/peer_file_recieve_paned_divide", numeric, NULL); g_object_unref(client); } /** * 创建主窗口. * @return 窗口 */ GtkWidget *DialogPeer::CreateMainWindow() { char buf[MAX_BUFLEN]; GtkWidget *window; gint width, height; PalInfo *palinfor; char ipstr[INET_ADDRSTRLEN]; window = gtk_window_new(GTK_WINDOW_TOPLEVEL); palinfor = (PalInfo *)grpinf->member->data; inet_ntop(AF_INET, &palinfor->ipv4, ipstr, INET_ADDRSTRLEN); snprintf(buf, MAX_BUFLEN, _("Talk with %s(%s) IP:%s"), palinfor->name,palinfor->host,ipstr); gtk_window_set_title(GTK_WINDOW(window), buf); width = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "window-width")); height = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "window-height")); gtk_window_set_default_size(GTK_WINDOW(window), width, height); gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER); gtk_window_add_accel_group(GTK_WINDOW(window), accel); widget_enable_dnd_uri(window); g_datalist_set_data(&widset, "window-widget", window); grpinf->dialog = window; g_object_set_data(G_OBJECT(window),"dialog",this); MainWindowSignalSetup(window); g_signal_connect_swapped(GTK_OBJECT(window), "show", G_CALLBACK(ShowDialogPeer), this); return window; } /** * 创建所有区域. * @return 主窗体 */ GtkWidget *DialogPeer::CreateAllArea() { GtkWidget *box; GtkWidget *hpaned, *vpaned; gint position; box = gtk_vbox_new(FALSE, 0); /* 加入菜单条 */ gtk_box_pack_start(GTK_BOX(box), CreateMenuBar(), FALSE, FALSE, 0); /* 加入主区域 */ hpaned = gtk_hpaned_new(); g_datalist_set_data(&widset, "main-paned", hpaned); g_object_set_data(G_OBJECT(hpaned), "position-name", (gpointer)"main-paned-divide"); position = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "main-paned-divide")); gtk_paned_set_position(GTK_PANED(hpaned), position); gtk_box_pack_start(GTK_BOX(box), hpaned, TRUE, TRUE, 0); g_signal_connect(hpaned, "notify::position", G_CALLBACK(PanedDivideChanged), &dtset); /*/* 加入聊天历史记录&输入区域 */ vpaned = gtk_vpaned_new(); g_object_set_data(G_OBJECT(vpaned), "position-name", (gpointer)"historyinput-paned-divide"); position = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "historyinput-paned-divide")); gtk_paned_set_position(GTK_PANED(vpaned), position); gtk_paned_pack1(GTK_PANED(hpaned), vpaned, TRUE, TRUE); g_signal_connect(vpaned, "notify::position", G_CALLBACK(PanedDivideChanged), &dtset); gtk_paned_pack1(GTK_PANED(vpaned), CreateHistoryArea(), TRUE, TRUE); gtk_paned_pack2(GTK_PANED(vpaned), CreateInputArea(), FALSE, TRUE); /* 加入好友信息&附件区域 */ vpaned = gtk_vpaned_new(); g_object_set_data(G_OBJECT(vpaned), "position-name", (gpointer)"infoenclosure-paned-divide"); position = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "infoenclosure-paned-divide")); gtk_paned_set_position(GTK_PANED(vpaned), position); gtk_paned_pack2(GTK_PANED(hpaned), vpaned, FALSE, TRUE); g_signal_connect(vpaned, "notify::position", G_CALLBACK(PanedDivideChanged), &dtset); gtk_paned_pack1(GTK_PANED(vpaned), CreateInfoArea(), TRUE, TRUE); gtk_paned_pack2(GTK_PANED(vpaned), CreateFileArea(), FALSE, TRUE); return box; } /** * 创建菜单条. * @return 菜单条 */ GtkWidget *DialogPeer::CreateMenuBar() { GtkWidget *menubar; menubar = gtk_menu_bar_new(); gtk_menu_shell_append(GTK_MENU_SHELL(menubar), CreateFileMenu()); gtk_menu_shell_append(GTK_MENU_SHELL(menubar), CreateToolMenu()); gtk_menu_shell_append(GTK_MENU_SHELL(menubar), CreateHelpMenu()); return menubar; } /** * 创建好友信息区域. * @return 主窗体 */ GtkWidget *DialogPeer::CreateInfoArea() { GtkWidget *frame, *sw; GtkWidget *widget; GtkTextBuffer *buffer; frame = gtk_frame_new(_("Info.")); g_datalist_set_data(&widset, "info-frame", frame); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); sw = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_container_add(GTK_CONTAINER(frame), sw); buffer = gtk_text_buffer_new(progdt.table); if (grpinf->member) FillPalInfoToBuffer(buffer, (PalInfo *)grpinf->member->data); widget = gtk_text_view_new_with_buffer(buffer); gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(widget), FALSE); gtk_text_view_set_editable(GTK_TEXT_VIEW(widget), FALSE); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(widget), GTK_WRAP_NONE); gtk_container_add(GTK_CONTAINER(sw), widget); g_datalist_set_data(&widset, "info-textview-widget", widget); return frame; } /** * 创建文件菜单. * @return 菜单 */ GtkWidget *DialogPeer::CreateFileMenu() { GtkWidget *menushell, *window; GtkWidget *menu, *menuitem; window = GTK_WIDGET(g_datalist_get_data(&widset, "window-widget")); menushell = gtk_menu_item_new_with_mnemonic(_("_File")); menu = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menushell), menu); menuitem = gtk_menu_item_new_with_label(_("Attach File")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(AttachRegular), this); gtk_widget_add_accelerator(menuitem, "activate", accel, GDK_S, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); menuitem = gtk_menu_item_new_with_label(_("Attach Folder")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(AttachFolder), this); gtk_widget_add_accelerator(menuitem, "activate", accel, GDK_D, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); menuitem = gtk_menu_item_new_with_label(_("Request Shared Resources")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(AskSharedFiles), grpinf); gtk_widget_add_accelerator(menuitem, "activate", accel, GDK_R, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); menuitem = gtk_tearoff_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); menuitem = gtk_menu_item_new_with_label(_("Close")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(gtk_widget_destroy), window); gtk_widget_add_accelerator(menuitem, "activate", accel, GDK_W, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); g_datalist_set_data(&widset, "file-menu",menu); return menushell; } /** * 创建工具菜单. * @return 菜单 */ GtkWidget *DialogPeer::CreateToolMenu() { GtkWidget *menushell; GtkWidget *menu, *menuitem; menushell = gtk_menu_item_new_with_mnemonic(_("_Tools")); menu = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menushell), menu); menuitem = gtk_menu_item_new_with_label(_("Insert Picture")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(InsertPicture), this); menuitem = gtk_menu_item_new_with_label(_("Clear Buffer")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(ClearHistoryBuffer), this); return menushell; } /** * 将好友信息数据写入指定的缓冲区. * @param buffer text-buffer * @param pal class PalInfo */ void DialogPeer::FillPalInfoToBuffer(GtkTextBuffer *buffer, PalInfo *pal) { char buf[MAX_BUFLEN], ipstr[INET_ADDRSTRLEN]; GdkPixbuf *pixbuf; GtkTextIter iter; gtk_text_buffer_get_end_iter(buffer, &iter); snprintf(buf, MAX_BUFLEN, _("Version: %s\n"), pal->version); gtk_text_buffer_insert(buffer, &iter, buf, -1); if (pal->group && *pal->group != '\0') snprintf(buf, MAX_BUFLEN, _("Nickname: %s@%s\n"), pal->name, pal->group); else snprintf(buf, MAX_BUFLEN, _("Nickname: %s\n"), pal->name); gtk_text_buffer_insert(buffer, &iter, buf, -1); snprintf(buf, MAX_BUFLEN, _("User: %s\n"), pal->user); gtk_text_buffer_insert(buffer, &iter, buf, -1); snprintf(buf, MAX_BUFLEN, _("Host: %s\n"), pal->host); gtk_text_buffer_insert(buffer, &iter, buf, -1); inet_ntop(AF_INET, &pal->ipv4, ipstr, INET_ADDRSTRLEN); if (pal->segdes && *pal->segdes != '\0') snprintf(buf, MAX_BUFLEN, _("Address: %s(%s)\n"), pal->segdes, ipstr); else snprintf(buf, MAX_BUFLEN, _("Address: %s\n"), ipstr); gtk_text_buffer_insert(buffer, &iter, buf, -1); if (!FLAG_ISSET(pal->flags, 0)) snprintf(buf, MAX_BUFLEN, _("Compatibility: Microsoft\n")); else snprintf(buf, MAX_BUFLEN, _("Compatibility: GNU/Linux\n")); gtk_text_buffer_insert(buffer, &iter, buf, -1); snprintf(buf, MAX_BUFLEN, _("System coding: %s\n"), pal->encode); gtk_text_buffer_insert(buffer, &iter, buf, -1); if (pal->sign && *pal->sign != '\0') { gtk_text_buffer_insert(buffer, &iter, _("Signature:\n"), -1); gtk_text_buffer_insert_with_tags_by_name(buffer, &iter, pal->sign, -1, "sign-words", NULL); } if (pal->photo && *pal->photo != '\0' && (pixbuf = gdk_pixbuf_new_from_file(pal->photo, NULL))) { gtk_text_buffer_insert(buffer, &iter, _("\nPhoto:\n"), -1); //TODO 缩放多少才合适 pixbuf_shrink_scale_1(&pixbuf, 200, -1); gtk_text_buffer_insert_pixbuf(buffer, &iter, pixbuf); g_object_unref(pixbuf); } } /** * 发送附件给好友 */ void DialogPeer::BroadcastEnclosureMsg(GSList *list) { SendFile sfile; GSList *plist; /* 向选中的成员发送附件 */ plist = NULL; plist = g_slist_append(plist, grpinf->member->data); sfile.BcstFileInfoEntry(plist, list); g_slist_free(plist); } /** * 发送文本消息. * @return 是否发送数据 */ bool DialogPeer::SendTextMsg() { static uint32_t count = 0; GtkWidget *textview; GtkTextBuffer *buffer; GtkTextIter start, end, piter, iter; GdkPixbuf *pixbuf; char buf[MAX_UDPLEN]; gchar *chipmsg, *ptr; pthread_t pid; size_t len; MsgPara *para; ChipData *chip; GSList *dtlist; /* 考察缓冲区内是否存在数据 */ textview = GTK_WIDGET(g_datalist_get_data(&widset, "input-textview-widget")); gtk_widget_grab_focus(textview); //为下一次任务做准备 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview)); gtk_text_buffer_get_bounds(buffer, &start, &end); if (gtk_text_iter_equal(&start, &end)) return false; /* 一些初始化工作 */ buf[0] = '\0'; //缓冲区数据为空 ptr = buf; len = 0; dtlist = NULL; //数据链表为空 /* 获取数据 */ piter = iter = start; //让指针指向缓冲区开始位置 do { /** * @note 由于gtk_text_iter_forward_find_char()会跳过当前字符, * 所以必须先考察第一个字符是否为图片. */ if ( (pixbuf = gtk_text_iter_get_pixbuf(&iter))) { /* 读取图片之前的字符数据,并写入缓冲区 */ chipmsg = gtk_text_buffer_get_text(buffer, &piter, &iter, FALSE); snprintf(ptr, MAX_UDPLEN - len, "%s%c", chipmsg, OCCUPY_OBJECT); len += strlen(ptr); ptr = buf + len; g_free(chipmsg); piter = iter; //移动 piter 到新位置 /* 保存图片 */ chipmsg = g_strdup_printf("%s" IPTUX_PATH "/%" PRIx32, g_get_user_config_dir(), count++); gdk_pixbuf_save(pixbuf, chipmsg, "bmp", NULL, NULL); /* 新建一个碎片数据(图片),并加入数据链表 */ chip = new ChipData; chip->type = MESSAGE_CONTENT_TYPE_PICTURE; chip->data = chipmsg; dtlist = g_slist_append(dtlist, chip); } } while (gtk_text_iter_forward_find_char(&iter, GtkTextCharPredicate(giter_compare_foreach), GUINT_TO_POINTER(ATOM_OBJECT), &end)); /* 读取余下的字符数据,并写入缓冲区 */ chipmsg = gtk_text_buffer_get_text(buffer, &piter, &end, FALSE); snprintf(ptr, MAX_UDPLEN - len, "%s", chipmsg); g_free(chipmsg); /* 新建一个碎片数据(字符串),并加入数据链表 */ chip = new ChipData; chip->type = MESSAGE_CONTENT_TYPE_STRING; chip->data = g_strdup(buf); dtlist = g_slist_prepend(dtlist, chip); //保证字符串先被发送 /* 清空缓冲区并发送数据 */ gtk_text_buffer_delete(buffer, &start, &end); FeedbackMsg(dtlist); para = PackageMsg(dtlist); pthread_create(&pid, NULL, ThreadFunc(ThreadSendTextMsg), para); pthread_detach(pid); /* g_slist_foreach(dtlist, GFunc(glist_delete_foreach), CHIP_DATA); */ /* g_slist_free(dtlist); */ return true; } /** * 回馈消息. * @param dtlist 数据链表 * @note 请不要修改链表(dtlist)中的数据 */ void DialogPeer::FeedbackMsg(const GSList *dtlist) { MsgPara para; /* 构建消息封装包 */ if (grpinf->member) para.pal = (PalInfo *)grpinf->member->data; else para.pal = cthrd.GetPalFromList(grpinf->grpid); para.stype = MESSAGE_SOURCE_TYPE_SELF; para.btype = grpinf->type; para.dtlist = (GSList *)dtlist; /* 交给某人处理吧 */ cthrd.InsertMsgToGroupInfoItem(grpinf, ¶); para.dtlist = NULL; //防止参数数据被修改 } /** * 封装消息. * @param dtlist 数据链表 * @return 消息封装包 */ MsgPara *DialogPeer::PackageMsg(GSList *dtlist) { MsgPara *para; para = new MsgPara; if (!(grpinf->member)) para->pal = cthrd.GetPalFromList(grpinf->grpid); else para->pal = (PalInfo *)grpinf->member->data; para->stype = MESSAGE_SOURCE_TYPE_SELF; para->btype = grpinf->type; para->dtlist = dtlist; return para; } /** * 图片拖拽事件响应函数. * @param dlgpr 对话框类 * @param context the drag context * @param x where the drop happened * @param y where the drop happened * @param data the received data * @param info the info that has been registered with the target in the GtkTargetList * @param time the timestamp at which the data was received */ void DialogPeer::DragPicReceived(DialogPeer *dlgpr, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, guint info, guint time) { GtkWidget *widget; GtkTextBuffer *buffer; GtkTextIter iter; GdkPixbuf *pixbuf; GSList *list, *flist, *tlist; gint position; if (data->length <= 0 || data->format != 8) { gtk_drag_finish(context, FALSE, FALSE, time); return; } /* 获取(text-buffer)的当前插入点 */ widget = GTK_WIDGET(g_datalist_get_data(&dlgpr->widset, "input-textview-widget")); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(widget)); g_object_get(buffer, "cursor-position", &position, NULL); gtk_text_buffer_get_iter_at_offset(buffer, &iter, position); /* 分离图片文件和常规文件,图片立即处理,常规文件稍候再处理 */ flist = NULL; //预置常规文件链表为空 tlist = list = selection_data_get_path(data); //获取所有文件 while (tlist) { if ( (pixbuf = gdk_pixbuf_new_from_file((char *)tlist->data, NULL))) { /* 既然是图片,那就立即处理吧 */ gtk_text_buffer_insert_pixbuf(buffer, &iter, pixbuf); g_object_unref(pixbuf); } else { /* 将文件路径转移至文件链表(flist) */ flist = g_slist_append(flist, tlist->data); tlist->data = NULL; } tlist = g_slist_next(tlist); } /*/* 释放链表数据 */ g_slist_foreach(list, GFunc(g_free), NULL); g_slist_free(list); /* 如果文件链表有文件,那就添加为附件吧 */ if (flist) { dlgpr->AttachEnclosure(flist); g_slist_foreach(flist, GFunc(g_free), NULL); g_slist_free(flist); widget = GTK_WIDGET(g_datalist_get_data(&dlgpr->widset, "enclosure-frame-widget")); gtk_widget_show(widget); } gtk_drag_finish(context, TRUE, FALSE, time); } /** * 请求获取此好友的共享文件. * @param grpinf 好友群组信息 */ void DialogPeer::AskSharedFiles(GroupInfo *grpinf) { Command cmd; PalInfo *pal; if (!(grpinf->member)) pal = cthrd.GetPalFromList(grpinf->grpid); else pal = (PalInfo *)grpinf->member->data; cmd.SendAskShared(cthrd.UdpSockQuote(), pal, 0, NULL); } /** * 插入图片到输入缓冲区. * @param dlgpr 对话框类 */ void DialogPeer::InsertPicture(DialogPeer *dlgpr) { GtkWidget *widget, *window; GtkTextBuffer *buffer; GtkTextIter iter; GdkPixbuf *pixbuf; gchar *filename; gint position; window = GTK_WIDGET(g_datalist_get_data(&dlgpr->widset, "window-widget")); if (!(filename = choose_file_with_preview( _("Please select a picture to insert the buffer"), window))) return; if (!(pixbuf = gdk_pixbuf_new_from_file(filename, NULL))) { g_free(filename); return; } g_free(filename); widget = GTK_WIDGET(g_datalist_get_data(&dlgpr->widset, "input-textview-widget")); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(widget)); g_object_get(buffer, "cursor-position", &position, NULL); gtk_text_buffer_get_iter_at_offset(buffer, &iter, position); gtk_text_buffer_insert_pixbuf(buffer, &iter, pixbuf); g_object_unref(pixbuf); } /** * 发送文本消息. * @param para 消息参数 */ void DialogPeer::ThreadSendTextMsg(MsgPara *para) { Command cmd; GSList *tlist; char *ptr; int sock; tlist = para->dtlist; while (tlist) { ptr = ((ChipData *)tlist->data)->data; switch (((ChipData *)tlist->data)->type) { case MESSAGE_CONTENT_TYPE_STRING: /* 文本类型 */ cmd.SendMessage(cthrd.UdpSockQuote(), para->pal, ptr); break; case MESSAGE_CONTENT_TYPE_PICTURE: /* 图片类型 */ if ((sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) { pop_error(_("Fatal Error!!\nFailed to create new socket!" "\n%s"), strerror(errno)); exit(1); } cmd.SendSublayer(sock, para->pal, IPTUX_MSGPICOPT, ptr); close(sock); //关闭网络套接口 /*/* 删除此图片 */ unlink(ptr); //此文件已无用处 break; default: break; } tlist = g_slist_next(tlist); } /* 释放资源 */ delete para; } /** * 创建文件接收和发送区域. * @return 主窗体 */ GtkWidget *DialogPeer::CreateFileArea() { GtkWidget *frame, *vpaned; gint position; frame = gtk_frame_new(_("Enclosure.")); g_datalist_set_data(&widset, "file-enclosure-frame-widget", frame); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); vpaned = gtk_vpaned_new(); g_object_set_data(G_OBJECT(vpaned), "position-name", (gpointer)"enclosure-paned-divide"); position = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "enclosure-paned-divide")); gtk_paned_set_position(GTK_PANED(vpaned), position); g_signal_connect(vpaned, "notify::position", G_CALLBACK(PanedDivideChanged), &dtset); gtk_container_add(GTK_CONTAINER(frame), vpaned); gtk_paned_pack1(GTK_PANED(vpaned),CreateFileReceiveArea(),TRUE,TRUE); gtk_paned_pack2(GTK_PANED(vpaned),CreateFileSendArea(),FALSE,TRUE); return frame; } /** * 创建文件接收区域. * @return 主窗体 */ GtkWidget *DialogPeer::CreateFileReceiveArea() { GtkWidget *vpaned; gint position; vpaned = gtk_vpaned_new(); g_datalist_set_data(&widset, "file-receive-paned-widget", vpaned); g_object_set_data(G_OBJECT(vpaned), "position-name", (gpointer)"file-receive-paned-divide"); position = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "file-receive-paned-divide")); gtk_paned_set_position(GTK_PANED(vpaned), position); g_signal_connect(vpaned, "notify::position", G_CALLBACK(PanedDivideChanged), &dtset); gtk_paned_pack1(GTK_PANED(vpaned),CreateFileToReceiveArea(),TRUE,FALSE); gtk_paned_pack2(GTK_PANED(vpaned),CreateFileReceivedArea(),TRUE,FALSE); return vpaned; } /** * 创建待接收文件区域. * @return 主窗体 */ GtkWidget *DialogPeer::CreateFileToReceiveArea() { GtkWidget *frame, *hbox, *vbox, *button ,*pbar, *sw, *treeview; GtkTreeModel *model; frame = gtk_frame_new(_("File to be receive.")); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); pbar = gtk_progress_bar_new(); g_datalist_set_data(&widset, "file-receive-progress-bar-widget", pbar); gtk_progress_bar_set_text(GTK_PROGRESS_BAR(pbar),_("Receiving progress.")); hbox = gtk_hbox_new(FALSE,1); gtk_box_pack_start(GTK_BOX(hbox),pbar,TRUE,TRUE,0); button = gtk_button_new_with_label(_("Accept")); g_signal_connect_swapped(button, "clicked", G_CALLBACK(ReceiveFile), this); g_datalist_set_data(&widset, "file-receive-accept-button", button); gtk_box_pack_start(GTK_BOX(hbox),button,FALSE,TRUE,0); button = gtk_button_new_with_label(_("Refuse")); gtk_box_pack_start(GTK_BOX(hbox),button,FALSE,TRUE,0); g_signal_connect_swapped(button, "clicked", G_CALLBACK(RemoveSelectedRcv), this); g_datalist_set_data(&widset, "file-receive-refuse-button", button); button = gtk_button_new_with_label(_("Detial")); gtk_box_pack_end(GTK_BOX(hbox),button,FALSE,TRUE,0); g_signal_connect_swapped(button, "clicked", G_CALLBACK(OpenTransDlg), NULL); vbox = gtk_vbox_new(FALSE,0); gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0); sw = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); model = CreateFileToReceiveModel(); g_datalist_set_data_full(&mdlset, "file-to-receive-model", model, GDestroyNotify(g_object_unref)); treeview = CreateFileToReceiveTree(model); g_datalist_set_data(&widset, "file-to-receive-treeview-widget", treeview); g_object_set_data(G_OBJECT(treeview), "dialog", this); gtk_container_add(GTK_CONTAINER(sw), treeview); gtk_box_pack_end(GTK_BOX(vbox),sw,TRUE,TRUE,0); gtk_container_add(GTK_CONTAINER(frame), vbox); return frame; } /** * 创建已接收文件区域. * @return 主窗体 */ GtkWidget *DialogPeer::CreateFileReceivedArea() { GtkWidget *frame, *sw, *treeview; GtkTreeModel *model; frame = gtk_frame_new(_("File received.")); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); sw = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); model = CreateFileReceivedModel(); g_datalist_set_data_full(&mdlset, "file-received-model", model, GDestroyNotify(g_object_unref)); treeview = CreateFileReceivedTree(model); g_datalist_set_data(&widset, "file-received-treeview-widget", treeview); g_object_set_data(G_OBJECT(treeview), "dialog", this); gtk_container_add(GTK_CONTAINER(sw), treeview); gtk_container_add(GTK_CONTAINER(frame), sw); return frame; } /** * 创建待接收文件树(FileToReceive-tree). * @param model FileToReceive-model * @return 待接收文件树 */ GtkWidget *DialogPeer::CreateFileToReceiveTree(GtkTreeModel *model) { GtkWidget *view; GtkTreeSelection *selection; GtkCellRenderer *cell; GtkTreeViewColumn *column; view = gtk_tree_view_new_with_model(model); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(view), TRUE); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(view)); gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE); cell = gtk_cell_renderer_pixbuf_new(); column = gtk_tree_view_column_new_with_attributes("",cell,"pixbuf",0,NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Source"),cell,"text",1,NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); g_object_set(cell, "editable", TRUE, NULL); column = gtk_tree_view_column_new_with_attributes(_("SaveAs"),cell,"text",2,NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Size"),cell,"text",3,NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); g_signal_connect_swapped(GTK_OBJECT(view), "button_press_event", G_CALLBACK(RcvTreePopup), view); // //增加一列用来标记拒绝接收的文件,删除时用的 // cell = gtk_cell_renderer_text_new(); // column = gtk_tree_view_column_new_with_attributes("tag",cell,"text",5,NULL); // gtk_tree_view_column_set_visible(column,FALSE); // gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); // g_signal_connect_swapped(GTK_OBJECT(view), "button_press_event", // G_CALLBACK(EncosureTreePopup), this); return view; } /** * 创建待接收文件树底层数据结构. * @return FileToReceive-model */ GtkTreeModel *DialogPeer::CreateFileToReceiveModel() { GtkListStore *model; model = gtk_list_store_new(6, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER); return GTK_TREE_MODEL(model); } /** * 创建已接收文件树(FileReceived-tree). * @param model FileReceived-model * @return 已接收文件树 */ GtkWidget *DialogPeer::CreateFileReceivedTree(GtkTreeModel *model) { GtkWidget *view; GtkTreeSelection *selection; GtkCellRenderer *cell; GtkTreeViewColumn *column; view = gtk_tree_view_new_with_model(model); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(view), TRUE); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(view)); gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE); cell = gtk_cell_renderer_pixbuf_new(); column = gtk_tree_view_column_new_with_attributes("",cell,"pixbuf",0,NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Source"),cell,"text",1,NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Name"),cell,"text",2,NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Size"),cell,"text",3,NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); g_signal_connect_swapped(GTK_OBJECT(view), "button_press_event", G_CALLBACK(RcvTreePopup), view); return view; } /** * 创建已接收文件树底层数据结构. * @return FileReceived-model */ GtkTreeModel *DialogPeer::CreateFileReceivedModel() { GtkListStore *model; model = gtk_list_store_new(6, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER); return GTK_TREE_MODEL(model); } /** * 显示信息/文件接收UI(是否显示信息或文件接收). * */ void DialogPeer::ShowInfoEnclosure(DialogPeer *dlgpr) { PalInfo *palinfor; GtkTreeModel *mdltorcv,*mdlrcvd,*mdltmp; GSList *ecslist; GtkWidget *widget,*hpaned,*pbar; float progress; GdkPixbuf *pixbuf, *rpixbuf, *dpixbuf; FileInfo *file; gchar *filesize,*path; char progresstip[MAX_BUFLEN]; GtkTreeIter iter; gint receiving;//标记是不是窗口在正传送文件时被关闭,又打开的。 receiving = 0; /* 获取文件图标 */ rpixbuf = obtain_pixbuf_from_stock(GTK_STOCK_FILE); dpixbuf = obtain_pixbuf_from_stock(GTK_STOCK_DIRECTORY); //设置界面显示 palinfor = (PalInfo *)(dlgpr->grpinf->member->data); mdltorcv = (GtkTreeModel*)g_datalist_get_data(&(dlgpr->mdlset), "file-to-receive-model"); gtk_list_store_clear(GTK_LIST_STORE(mdltorcv)); mdlrcvd = (GtkTreeModel*)g_datalist_get_data(&(dlgpr->mdlset), "file-received-model"); gtk_list_store_clear(GTK_LIST_STORE(mdlrcvd)); ecslist = cthrd.GetPalEnclosure(palinfor); if(ecslist) { //只要有该好友的接收文件信息(不分待接收和未接收),就显示 hpaned = GTK_WIDGET(g_datalist_get_data(&(dlgpr->widset), "main-paned")); widget = GTK_WIDGET(g_datalist_get_data(&(dlgpr->widset), "info-frame")); gtk_widget_hide(widget); widget = GTK_WIDGET(g_datalist_get_data(&(dlgpr->widset),"file-enclosure-frame-widget")); gtk_paned_pack2(GTK_PANED(hpaned), widget, FALSE, TRUE); widget = GTK_WIDGET(g_datalist_get_data(&(dlgpr->widset),"file-receive-paned-widget")); gtk_widget_show(widget); //将从中心节点取到的数据向附件接收列表填充 dlgpr->torcvsize = 0; while (ecslist) { file = (FileInfo *)ecslist->data; filesize = numeric_to_size(file->filesize); switch (GET_MODE(file->fileattr)) { case IPMSG_FILE_REGULAR: pixbuf = rpixbuf; break; case IPMSG_FILE_DIR: pixbuf = dpixbuf; break; default: pixbuf = NULL; break; } if(file->finishedsize < file->filesize) { file->filepath = ipmsg_get_filename_me(file->filepath,&path); if(file->finishedsize > 0) receiving += 1; mdltmp = mdltorcv; dlgpr->torcvsize += file->filesize; } else mdltmp = mdlrcvd; gtk_list_store_append(GTK_LIST_STORE(mdltmp), &iter); gtk_list_store_set(GTK_LIST_STORE(mdltmp), &iter, 0, pixbuf, 1, file->fileown->name, 2, file->filepath, 3, filesize, 5,file, -1); g_free(filesize); ecslist = g_slist_next(ecslist); } g_slist_free(ecslist); //设置进度条,如果接收完成重新载入待接收和已接收列表 if(dlgpr->torcvsize == 0) { progress = 0; snprintf(progresstip, MAX_BUFLEN,_("Receiving Progress.")); } else { if(dlgpr->rcvdsize == 0) snprintf(progresstip, MAX_BUFLEN,_("%s to Receive."), numeric_to_size(dlgpr->torcvsize)); else { progress = percent(dlgpr->rcvdsize,dlgpr->torcvsize)/100; snprintf(progresstip, MAX_BUFLEN, _("%s Of %s Received."), numeric_to_size(dlgpr->rcvdsize),numeric_to_size(dlgpr->torcvsize)); } } if(progress == 1.0){ g_source_remove(dlgpr->timerrcv); snprintf(progresstip, MAX_BUFLEN,_("Mission Completed!")); } pbar = GTK_WIDGET(g_datalist_get_data(&(dlgpr->widset), "file-receive-progress-bar-widget")); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(pbar),progress); gtk_progress_bar_set_text(GTK_PROGRESS_BAR(pbar),progresstip); } else { widget = GTK_WIDGET(g_datalist_get_data(&(dlgpr->widset), "file-receive-paned-widget")); gtk_widget_hide(widget); } /* 释放文件图标 */ if (rpixbuf) g_object_unref(rpixbuf); if (dpixbuf) g_object_unref(dpixbuf); if(receiving > 0) dlgpr->ReceiveFile(dlgpr); } /** * 显示窗口事件响应函数. *@param dlgpr 对话框类 * */ bool DialogPeer::UpdataEnclosureRcvUI(DialogPeer *dlgpr) { GtkTreeModel *model; GtkWidget *pbar,*button; float progress; FileInfo *file; GtkTreeIter iter; GtkIconTheme *theme; GdkPixbuf *pixbuf; const char *statusfile; char progresstip[MAX_BUFLEN]; /* 获取文件图标 */ theme = gtk_icon_theme_get_default(); statusfile = "tip-finish"; pixbuf = gtk_icon_theme_load_icon(theme, statusfile, MAX_ICONSIZE, GtkIconLookupFlags(0), NULL); //处理待接收文件界面显示 model = (GtkTreeModel*)g_datalist_get_data(&(dlgpr->mdlset), "file-to-receive-model"); if(!model) { g_source_remove(dlgpr->timerrcv); return FALSE; } dlgpr->rcvdsize = 0; gtk_tree_model_get_iter_first(model, &iter); do { //遍历待接收model gtk_tree_model_get(model, &iter,5,&file, -1); if(pixbuf && (file->finishedsize == file->filesize)) gtk_list_store_set(GTK_LIST_STORE(model), &iter,0,pixbuf,-1); dlgpr->rcvdsize += file->finishedsize; } while (gtk_tree_model_iter_next(model, &iter)); //设置进度条,如果接收完成重新载入待接收和已接收列表 if(dlgpr->torcvsize == 0) { progress = 0; snprintf(progresstip, MAX_BUFLEN,_("Receiving Progress.")); } else { if(dlgpr->rcvdsize == 0) snprintf(progresstip, MAX_BUFLEN,_("%s to Receive."), numeric_to_size(dlgpr->torcvsize)); else { progress = percent(dlgpr->rcvdsize,dlgpr->torcvsize)/100; snprintf(progresstip, MAX_BUFLEN, _("%s Of %s Received."), numeric_to_size(dlgpr->rcvdsize),numeric_to_size(dlgpr->torcvsize)); } } pbar = GTK_WIDGET(g_datalist_get_data(&(dlgpr->widset), "file-receive-progress-bar-widget")); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(pbar),progress); gtk_progress_bar_set_text(GTK_PROGRESS_BAR(pbar),progresstip); if((progress == 1) || (progress == 0)){ if(progress == 1) { g_source_remove(dlgpr->timerrcv); dlgpr->ShowInfoEnclosure(dlgpr); } //只要不是在接收过程中,恢复接收和拒收按键 button = GTK_WIDGET(g_datalist_get_data(&(dlgpr->widset), "file-receive-accept-button")); gtk_widget_set_sensitive(button,TRUE); button = GTK_WIDGET(g_datalist_get_data(&(dlgpr->widset), "file-receive-refuse-button")); gtk_widget_set_sensitive(button,TRUE); } else { //接收过程中,禁止点接收和拒收按键 button = GTK_WIDGET(g_datalist_get_data(&(dlgpr->widset), "file-receive-accept-button")); gtk_widget_set_sensitive(button,FALSE); button = GTK_WIDGET(g_datalist_get_data(&(dlgpr->widset), "file-receive-refuse-button")); gtk_widget_set_sensitive(button,FALSE); } return TRUE; } /** * 显示窗口事件响应函数. *@param dlgpr 对话框类 * */ void DialogPeer::ShowDialogPeer(DialogPeer *dlgpr) { //这个事件有可能需要触发其它功能,暂没有直接用ShowInfoEnclosure来执行 ShowInfoEnclosure(dlgpr); } /** * 接收文件函数. *@param dlgpr 对话框类 * */ void DialogPeer::ReceiveFile(DialogPeer *dlgpr) { GtkWidget *widget; GtkTreeModel *model; GtkTreeIter iter; gchar *filename, *filepath; FileInfo *file; pthread_t pid; filepath = pop_save_path(GTK_WIDGET(dlgpr->grpinf->dialog)); g_free(progdt.path); progdt.path = filepath; /* 考察数据集中是否存在项 */ widget = GTK_WIDGET(g_datalist_get_data(&(dlgpr->widset), "file-to-receive-treeview-widget")); model = gtk_tree_view_get_model(GTK_TREE_VIEW(widget)); if(!model) return; if (!gtk_tree_model_get_iter_first(model, &iter)) return; dlgpr->torcvsize = 0; /* 将选中的项投入文件数据接收类 */ do { gtk_tree_model_get(model, &iter,2, &filename, 5, &file, -1); g_free(file->filepath); file->filepath = g_strdup_printf("%s%s%s", filepath, *(filepath + 1) != '\0' ? "/" : "", filename); pthread_create(&pid, NULL, ThreadFunc(ThreadRecvFile), file); pthread_detach(pid); g_free(filename); dlgpr->torcvsize += file->filesize; } while (gtk_tree_model_iter_next(model, &iter)); dlgpr->rcvdsize = 0; dlgpr->timerrcv = g_timeout_add(300, GSourceFunc(UpdataEnclosureRcvUI), dlgpr); } /** * 接收文件数据. * @param file 文件信息 */ void DialogPeer::ThreadRecvFile(FileInfo *file) { RecvFileData rfdt(file); rfdt.RecvFileDataEntry(); } /** * 获取待发送成员列表. * @return plist 获取待发送成员列表 * 调用该函数后须free plist */ GSList *DialogPeer::GetSelPal() { PalInfo *pal; GSList *plist; pal = (PalInfo *)(grpinf->member->data); plist = NULL; plist = g_slist_append(plist, pal); return plist; } /** *从接收文件的TreeView删除选定行(待接收和已接收都用此函数). * @param widget TreeView */ void DialogPeer::RemoveSelectedRcv(GtkWidget *widget) { GtkTreeModel *model; GtkTreeSelection *TreeSel; GtkTreeIter iter; FileInfo *file; DialogPeer *dlg; GList *list; dlg = (DialogPeer *)(g_object_get_data(G_OBJECT(widget),"dialog")); model = gtk_tree_view_get_model(GTK_TREE_VIEW(widget)); //从中心结点删除 TreeSel = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget)); list = gtk_tree_selection_get_selected_rows(TreeSel,NULL); if(!list) return; while(list) { gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, (GtkTreePath *)g_list_nth(list, 0)->data); gtk_tree_model_get(model, &iter,5,&file, -1); cthrd.PopItemFromEnclosureList(file); list = g_list_next(list); } g_list_free(list); //从列表中删除 RemoveSelectedFromTree(widget); //重新刷新窗口显示 dlg->ShowInfoEnclosure(dlg); } /** *显示接收附件的TreeView的弹出菜单回调函数.(待接收和已接收都用此函数) * @param widget TreeView * @param event 事件 */ gint DialogPeer::RcvTreePopup(GtkWidget *treeview,GdkEvent *event) { GtkWidget *menu,*menuitem; GdkEventButton *event_button; menu = gtk_menu_new(); menuitem = gtk_menu_item_new_with_label(_("Remove Selected")); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(RemoveSelectedRcv), treeview); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); if (event->type == GDK_BUTTON_PRESS) { event_button = (GdkEventButton *) event; if (event_button->button == 3) { gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, event_button->button, event_button->time); gtk_widget_show(menuitem); return TRUE; } } return FALSE; } iptux-0.6.3/src/DialogPeer.h000077500000000000000000000053431257720006400156570ustar00rootroot00000000000000// // C++ Interface: DialogPeer // // Description: // 与单个好友对话 // // Author: cwll ,(C) 2012.02 // Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef DIALOGPEER_H #define DIALOGPEER_H #include "mess.h" #include "DialogBase.h" class DialogPeer: public DialogBase { public: DialogPeer(GroupInfo *grp); virtual ~DialogPeer(); static void PeerDialogEntry(GroupInfo *grpinf); virtual void UpdatePalData(PalInfo *pal); virtual void InsertPalData(PalInfo *pal); virtual void DelPalData(PalInfo *pal); virtual void ClearAllPalData(); virtual GSList *GetSelPal(); static void ShowDialogPeer(DialogPeer *dlgpr); private: void ReadUILayout(); void WriteUILayout(); GtkWidget *CreateMainWindow(); GtkWidget *CreateAllArea(); GtkWidget *CreateMenuBar(); GtkWidget *CreateInfoArea(); GtkWidget *CreateFileArea(); GtkWidget *CreateFileReceiveArea(); GtkWidget *CreateFileToReceiveArea(); GtkWidget *CreateFileReceivedArea(); GtkWidget *CreateFileToReceiveTree(GtkTreeModel *model); GtkTreeModel *CreateFileToReceiveModel(); GtkWidget *CreateFileReceivedTree(GtkTreeModel *model); GtkTreeModel *CreateFileReceivedModel(); GtkWidget *CreateFileMenu(); GtkWidget *CreateToolMenu(); void FillPalInfoToBuffer(GtkTextBuffer *buffer, PalInfo *pal); private: void BroadcastEnclosureMsg(GSList *list); bool SendTextMsg(); void FeedbackMsg(const GSList *dtlist); MsgPara *PackageMsg(GSList *dtlist); //回调处理部分 private: static void DragPicReceived(DialogPeer *dlgpr, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, guint info, guint time); static void AskSharedFiles(GroupInfo *grpinf); static void InsertPicture(DialogPeer *dlgpr); static void DialogPeerDestroy(DialogPeer *dlgpr); static void ReceiveFile(DialogPeer *dlgpr); static void ThreadRecvFile(FileInfo *file); static void ShowInfoEnclosure(DialogPeer *dlgpr); static bool UpdataEnclosureRcvUI(DialogPeer *dlgpr); static void RemoveSelectedRcv(GtkWidget *widget); static gint RcvTreePopup(GtkWidget *treeview,GdkEvent *event); //线程处理 private: static void ThreadSendTextMsg(MsgPara *para); protected: int64_t torcvsize; //总计待接收大小(包括已接收) int64_t rcvdsize; //总计已接收大小 guint timerrcv; //接收文件界面更新计时器ID }; #endif iptux-0.6.3/src/HelpDialog.cpp000077500000000000000000000170401257720006400162040ustar00rootroot00000000000000// // C++ Implementation: HelpDialog // // Description: // // // Author: Jally , (C) 2008 // Jally & ManPT , (C) 2009 // // Copyright: See COPYING file that comes with this distribution // // #include "HelpDialog.h" #include "support.h" /* 静态变量初始化 */ GtkWidget *HelpDialog::about = NULL; GtkWidget *HelpDialog::more = NULL; HelpDialog::HelpDialog() { } HelpDialog::~HelpDialog() { } /** * 关于对话框入口. */ void HelpDialog::AboutEntry() { HelpDialog hlp; if (!about) { about = hlp.CreateAboutDialog(); hlp.RunHelpDialog(&about); } else gtk_window_present(GTK_WINDOW(about)); } /** * 更多信息对话框入口. */ void HelpDialog::MoreEntry() { HelpDialog hlp; if (!more) { more = hlp.CreateMoreDialog(); hlp.RunHelpDialog(&more); } else gtk_window_present(GTK_WINDOW(more)); } /** * 创建关于对话框. */ GtkWidget *HelpDialog::CreateAboutDialog() { const char *authors[] = { _("Jally "), _("ManPT "), NULL }; const char *artists[] = { _("Jally "), _("LiWeijian "), _("ManPT "), NULL }; const char *translators = _("alick \n" "ManPT "); GtkWidget *dialog; dialog = gtk_about_dialog_new(); gtk_about_dialog_set_email_hook( GtkAboutDialogActivateLinkFunc(DialogOpenEmail), NULL, NULL); gtk_about_dialog_set_url_hook( GtkAboutDialogActivateLinkFunc(DialogOpenUrl), NULL, NULL); gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(dialog), _("iptux")); gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), VERSION); gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(dialog), "Copyright © 2008-2009 by Jally"); gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(dialog), _("A GTK+ based LAN Messenger.")); gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(dialog), "https://github.com/iptux-src/iptux"); gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(dialog), "GPL 2+"); gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(dialog), authors); gtk_about_dialog_set_artists(GTK_ABOUT_DIALOG(dialog), artists); gtk_about_dialog_set_translator_credits(GTK_ABOUT_DIALOG(dialog), translators); gtk_about_dialog_set_logo_icon_name(GTK_ABOUT_DIALOG(dialog), "ip-tux"); return dialog; } /** * 创建更多信息对话框. */ GtkWidget *HelpDialog::CreateMoreDialog() { char *labels[] = {_("Help"), _("Contributers"), _("..."), NULL}; char *text[] = { _("Project Home: \nhttps://github.com/iptux-src/iptux\n\n" "User and Developer Group: \nhttps://groups.google.com/group/iptux/\n\n" "Note that you can get help form the project wiki page.\n\n" "If you find no solutions in any of the existed documents, " "feel free to drop a email at iptux@googlegroups.com, " "lots of users and developers would be glade to help about your problems."), _("It's an honor that iptux was contributed voluntarilly by many people. " "Without your help, iptux could never make it.\n\n" "Especially, Here's some we would like to thank much:\n\n" "ChenGang\n" "\n" "\n" "\n" "\n" "\n" "..."), _("...") }; GtkWidget *dialog; GtkWidget *frame, *sw; GtkWidget *notebook, *label, *view; GtkTextBuffer *buffer; gint page; dialog = gtk_dialog_new_with_buttons(_("More About Iptux"), NULL, GTK_DIALOG_NO_SEPARATOR, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); gtk_widget_set_size_request(dialog, 500, 350); frame = gtk_frame_new(NULL); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), frame, TRUE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(frame), 3); notebook = gtk_notebook_new(); gtk_container_add(GTK_CONTAINER(frame), notebook); page = 0; while (labels[page]) { sw = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); label = gtk_label_new(labels[page]); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), sw, label); view = gtk_text_view_new(); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(view), GTK_WRAP_WORD); gtk_container_add(GTK_CONTAINER(sw), view); gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(view), FALSE); gtk_text_view_set_indent(GTK_TEXT_VIEW(view), 20); gtk_text_view_set_pixels_inside_wrap(GTK_TEXT_VIEW(view), 5); gtk_text_view_set_editable (GTK_TEXT_VIEW(view), FALSE); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(view)); gtk_text_buffer_set_text(buffer, text[page], -1); page++; } return dialog; } /** * 运行对话框. * @param dialog 对话框指针 */ void HelpDialog::RunHelpDialog(GtkWidget **dialog) { g_signal_connect(*dialog, "close", G_CALLBACK(gtk_widget_destroy), NULL); g_signal_connect(*dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL); g_signal_connect_swapped(*dialog, "destroy", G_CALLBACK(DialogDestroy), dialog); gtk_window_set_skip_taskbar_hint(GTK_WINDOW(*dialog), TRUE); gtk_window_set_skip_pager_hint(GTK_WINDOW(*dialog), TRUE); gtk_widget_show_all(*dialog); } /** * 打开email. * @param dialog 对话框 * @param link email */ void HelpDialog::DialogOpenEmail(GtkWidget *dialog, const gchar *link) { const char *prefix = "mailto:"; gchar *ptr; if (strncasecmp(link, prefix, strlen(prefix)) != 0) ptr = g_strdup_printf("%s%s", prefix, link); else ptr = g_strdup(link); #if GTK_CHECK_VERSION(2,14,0) if (!gtk_show_uri(NULL, ptr, GDK_CURRENT_TIME, NULL)) #endif iptux_open_url(ptr); g_free(ptr); } /** * 打开URL. * @param dialog 对话框 * @param link URL */ void HelpDialog::DialogOpenUrl(GtkWidget *dialog, const gchar *link) { #if GTK_CHECK_VERSION(2,14,0) if (!gtk_show_uri(NULL, link, GDK_CURRENT_TIME, NULL)) #endif iptux_open_url(link); } /** * 对话框被摧毁的响应函数. * @param dialog 对话框指针 */ void HelpDialog::DialogDestroy(GtkWidget **dialog) { *dialog = NULL; } iptux-0.6.3/src/HelpDialog.h000077500000000000000000000015251257720006400156520ustar00rootroot00000000000000// // C++ Interface: HelpDialog // // Description: // 创建帮助相关对话框 // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef HelpDialog_H #define HelpDialog_H #include "deplib.h" class HelpDialog { public: HelpDialog(); ~HelpDialog(); static void AboutEntry(); static void MoreEntry(); private: GtkWidget *CreateAboutDialog(); GtkWidget *CreateMoreDialog(); void RunHelpDialog(GtkWidget **dialog); static GtkWidget *about; static GtkWidget *more; //回调处理部分 private: static void DialogOpenEmail(GtkWidget *dialog, const gchar *link); static void DialogOpenUrl(GtkWidget *dialog, const gchar *link); static void DialogDestroy(GtkWidget **dialog); }; #endif iptux-0.6.3/src/LogSystem.cpp000077500000000000000000000052441257720006400161250ustar00rootroot00000000000000// // C++ Implementation: LogSystem // // Description: // 实时写入日志信息 // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #include "LogSystem.h" #include "ProgramData.h" #include "utils.h" extern ProgramData progdt; #define LOG_START_HEADER "=====================================" #define LOG_END_HEADER "-------------------------------------" LogSystem::LogSystem():fdc(-1), fds(-1) { } LogSystem::~LogSystem() { close(fdc); close(fds); } void LogSystem::InitSublayer() { const gchar *env; char path[MAX_PATHLEN]; env = g_get_user_config_dir(); snprintf(path, MAX_PATHLEN, "%s" LOG_PATH "/communicate.log", env); fdc = open(path, O_WRONLY | O_CREAT | O_APPEND, 0644); snprintf(path, MAX_PATHLEN, "%s" LOG_PATH "/system.log", env); fds = open(path, O_WRONLY | O_CREAT | O_APPEND, 0644); } void LogSystem::CommunicateLog(MsgPara *msgpara, const char *fmt, ...) { gchar *log, *msg, *ptr; va_list ap; if (!FLAG_ISSET(progdt.flags, 2)) return; PalInfo *pal = msgpara->pal; if (msgpara->stype == MESSAGE_SOURCE_TYPE_PAL) ptr = getformattime(TRUE, _("Recevied-From: Nickname:%s User:%s Host:%s"), pal->name,pal->user, pal->host); else if (msgpara->stype == MESSAGE_SOURCE_TYPE_SELF) { if (msgpara->pal) ptr = getformattime(TRUE, _("Send-To: Nickname:%s User:%s Host:%s"), pal->name, pal->user, pal->host); else ptr = getformattime(TRUE, _("Send-Broadcast")); } else return; va_start(ap, fmt); msg = g_strdup_vprintf(fmt, ap); va_end(ap); log = g_strdup_printf("%s\n%s\n%s\n%s\n\n", LOG_START_HEADER, ptr, msg, LOG_END_HEADER); write(fdc, log, strlen(log)); g_free(log); g_free(ptr); g_free(msg); } void LogSystem::SystemLog(const char *fmt, ...) { gchar *log, *msg, *ptr; va_list ap; if (!FLAG_ISSET(progdt.flags, 2)) return; ptr = getformattime(TRUE, _("User:%s Host:%s"), g_get_user_name(), g_get_host_name()); va_start(ap, fmt); msg = g_strdup_vprintf(fmt, ap); va_end(ap); log = g_strdup_printf("%s\n%s\n%s\n%s\n\n", LOG_START_HEADER, ptr, msg, LOG_END_HEADER); g_free(ptr); g_free(msg); write(fds, log, strlen(log)); g_free(log); } iptux-0.6.3/src/LogSystem.h000077500000000000000000000007751257720006400155760ustar00rootroot00000000000000// // C++ Interface: LogSystem // // Description: // 相关日志记录 // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef LOGSYSTEM_H #define LOGSYSTEM_H #include "mess.h" class LogSystem { public: LogSystem(); ~LogSystem(); void InitSublayer(); void CommunicateLog(MsgPara *msgpara, const char *fmt, ...); void SystemLog(const char *fmt, ...); private: int fdc, fds; }; #endif iptux-0.6.3/src/MainWindow.cpp000077500000000000000000003111061257720006400162500ustar00rootroot00000000000000// // C++ Implementation: MainWindow // // Description: // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #include "MainWindow.h" #include "ProgramData.h" #include "CoreThread.h" #include "DialogPeer.h" #include "DialogGroup.h" #include "DataSettings.h" #include "Command.h" #include "DetectPal.h" #include "ShareFile.h" #include "RevisePal.h" #include "HelpDialog.h" #include "callback.h" #include "support.h" #include "utils.h" extern ProgramData progdt; extern CoreThread cthrd; extern MainWindow mwin; #define TRANS_TREE_MAX 14 /** * 类构造函数. */ MainWindow::MainWindow():widset(NULL), mdlset(NULL), dtset(NULL), tmdllist(NULL), accel(NULL), timerid(0) { } /** * 类析构函数. */ MainWindow::~MainWindow() { WriteUILayout(); ClearSublayer(); } /** * 创建程序主窗口入口. */ void MainWindow::CreateWindow() { GtkWidget *window; GtkWidget *widget; InitSublayer(); ReadUILayout(); /* 创建主窗口 */ window = CreateMainWindow(); gtk_container_add(GTK_CONTAINER(window), CreateAllArea()); gtk_widget_show_all(window); /* 聚焦到好友树(paltree)区域 */ widget = GTK_WIDGET(g_datalist_get_data(&widset, "paltree-treeview-widget")); gtk_widget_grab_focus(widget); /* 隐藏好友清单 */ widget = GTK_WIDGET(g_datalist_get_data(&widset, "pallist-box-widget")); gtk_widget_hide(widget); /* 如果需要隐藏主窗口,则隐藏 */ if (FLAG_ISSET(progdt.flags, 6)) gtk_widget_hide(window); /* 创建传输窗口 */ window = CreateTransWindow(); gtk_container_add(GTK_CONTAINER(window), CreateTransArea()); gtk_widget_show_all(window); gtk_widget_hide(window); } /** * 更改窗口显示模式. */ void MainWindow::AlterWindowMode() { GtkWidget *window; window = GTK_WIDGET(g_datalist_get_data(&widset, "window-widget")); if (GTK_WIDGET_VISIBLE(window)) gtk_widget_hide(window); else gtk_widget_show(window); } /** * 获取主窗口指针. * @return 主窗口 */ GtkWidget *MainWindow::ObtainWindow() { return GTK_WIDGET(g_datalist_get_data(&widset, "window-widget")); } /** * 好友树(paltree)中是否已经包含此IP地址的好友信息数据. * @param ipv4 ipv4 * @return 是否包含 */ bool MainWindow::PaltreeContainItem(in_addr_t ipv4) { GtkTreeModel *model; GtkTreeIter iter; GroupInfo *grpinf; PalInfo *pal; bool exist; if (!(pal = cthrd.GetPalFromList(ipv4)) || !(grpinf = cthrd.GetPalRegularItem(pal))) return false; model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "regular-paltree-model")); exist = GroupGetPaltreeItem(model, &iter, grpinf); return exist; } /** * 更新此IP地址好友在好友树(paltree)中的信息数据. * @param ipv4 ipv4 */ void MainWindow::UpdateItemToPaltree(in_addr_t ipv4) { GtkTreeModel *model; GtkTreeIter parent, iter; GroupInfo *pgrpinf, *grpinf; PalInfo *pal; if (!(pal = cthrd.GetPalFromList(ipv4)) || !(grpinf = cthrd.GetPalRegularItem(pal))) return; /* 更新常规模式树 */ model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "regular-paltree-model")); GroupGetPaltreeItem(model, &iter, grpinf); UpdateGroupInfoToPaltree(model, &iter, grpinf); /* 更新网段模式树 */ model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "segment-paltree-model")); pgrpinf = cthrd.GetPalSegmentItem(pal); GroupGetPaltreeItem(model, &iter, pgrpinf); GroupGetPaltreeItemWithParent(model, &iter, grpinf); UpdateGroupInfoToPaltree(model, &iter, grpinf); /* 更新分组模式树 */ model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "group-paltree-model")); pgrpinf = cthrd.GetPalGroupItem(pal); GroupGetPrevPaltreeItem(model, &iter, grpinf); gtk_tree_model_iter_parent(model, &parent, &iter); if (gtk_tree_model_iter_n_children(model, &parent) == 1) gtk_tree_store_remove(GTK_TREE_STORE(model), &parent); else gtk_tree_store_remove(GTK_TREE_STORE(model), &iter); if (!GroupGetPaltreeItem(model, &parent, pgrpinf)) { gtk_tree_store_append(GTK_TREE_STORE(model), &parent, NULL); FillGroupInfoToPaltree(model, &parent, pgrpinf); } gtk_tree_store_append(GTK_TREE_STORE(model), &iter, &parent); FillGroupInfoToPaltree(model, &iter, grpinf); UpdateGroupInfoToPaltree(model, &parent, pgrpinf); /* 更新广播模式树 */ model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "broadcast-paltree-model")); pgrpinf = cthrd.GetPalBroadcastItem(pal); GroupGetPaltreeItem(model, &iter, pgrpinf); GroupGetPaltreeItemWithParent(model, &iter, grpinf); UpdateGroupInfoToPaltree(model, &iter, grpinf); } /** * 附加此IP地址的好友到好友树(paltree). * @param ipv4 ipv4 */ void MainWindow::AttachItemToPaltree(in_addr_t ipv4) { GtkTreeModel *model; GtkTreeIter parent, iter; GroupInfo *pgrpinf, *grpinf; PalInfo *pal; if (!(pal = cthrd.GetPalFromList(ipv4)) || !(grpinf = cthrd.GetPalRegularItem(pal))) return; /* 添加到常规模式树 */ model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "regular-paltree-model")); gtk_tree_store_append(GTK_TREE_STORE(model), &iter, NULL); FillGroupInfoToPaltree(model, &iter, grpinf); /* 添加到网段模式树 */ model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "segment-paltree-model")); pgrpinf = cthrd.GetPalSegmentItem(pal); if (!GroupGetPaltreeItem(model, &parent, pgrpinf)) { gtk_tree_store_append(GTK_TREE_STORE(model), &parent, NULL); FillGroupInfoToPaltree(model, &parent, pgrpinf); } gtk_tree_store_append(GTK_TREE_STORE(model), &iter, &parent); FillGroupInfoToPaltree(model, &iter, grpinf); UpdateGroupInfoToPaltree(model, &parent, pgrpinf); /* 添加到分组模式树 */ model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "group-paltree-model")); pgrpinf = cthrd.GetPalGroupItem(pal); if (!GroupGetPaltreeItem(model, &parent, pgrpinf)) { gtk_tree_store_append(GTK_TREE_STORE(model), &parent, NULL); FillGroupInfoToPaltree(model, &parent, pgrpinf); } gtk_tree_store_append(GTK_TREE_STORE(model), &iter, &parent); FillGroupInfoToPaltree(model, &iter, grpinf); UpdateGroupInfoToPaltree(model, &parent, pgrpinf); /* 添加到广播模式树 */ model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "broadcast-paltree-model")); pgrpinf = cthrd.GetPalBroadcastItem(pal); if (!GroupGetPaltreeItem(model, &parent, pgrpinf)) { gtk_tree_store_append(GTK_TREE_STORE(model), &parent, NULL); FillGroupInfoToPaltree(model, &parent, pgrpinf); } gtk_tree_store_append(GTK_TREE_STORE(model), &iter, &parent); FillGroupInfoToPaltree(model, &iter, grpinf); UpdateGroupInfoToPaltree(model, &parent, pgrpinf); } /** * 从好友树(paltree)中删除此IP地址的好友. * @param ipv4 ipv4 */ void MainWindow::DelItemFromPaltree(in_addr_t ipv4) { GtkTreeModel *model; GtkTreeIter parent, iter; GroupInfo *pgrpinf, *grpinf; PalInfo *pal; if (!(pal = cthrd.GetPalFromList(ipv4)) || !(grpinf = cthrd.GetPalRegularItem(pal))) return; /* 从常规模式树移除 */ model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "regular-paltree-model")); GroupGetPaltreeItem(model, &iter, grpinf); gtk_tree_store_remove(GTK_TREE_STORE(model), &iter); /* 从网段模式树移除 */ model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "segment-paltree-model")); pgrpinf = cthrd.GetPalSegmentItem(pal); GroupGetPaltreeItem(model, &parent, pgrpinf); if (g_slist_length(pgrpinf->member) != 1) { iter = parent; GroupGetPaltreeItemWithParent(model, &iter, grpinf); gtk_tree_store_remove(GTK_TREE_STORE(model), &iter); UpdateGroupInfoToPaltree(model, &parent, pgrpinf); } else gtk_tree_store_remove(GTK_TREE_STORE(model), &parent); /* 从分组模式树移除 */ model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "group-paltree-model")); pgrpinf = cthrd.GetPalGroupItem(pal); GroupGetPaltreeItem(model, &parent, pgrpinf); if (g_slist_length(pgrpinf->member) != 1) { iter = parent; GroupGetPaltreeItemWithParent(model, &iter, grpinf); gtk_tree_store_remove(GTK_TREE_STORE(model), &iter); UpdateGroupInfoToPaltree(model, &parent, pgrpinf); } else gtk_tree_store_remove(GTK_TREE_STORE(model), &parent); /* 从广播模式树移除 */ model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "broadcast-paltree-model")); pgrpinf = cthrd.GetPalBroadcastItem(pal); GroupGetPaltreeItem(model, &parent, pgrpinf); if (g_slist_length(pgrpinf->member) != 1) { iter = parent; GroupGetPaltreeItemWithParent(model, &iter, grpinf); gtk_tree_store_remove(GTK_TREE_STORE(model), &iter); UpdateGroupInfoToPaltree(model, &parent, pgrpinf); } else gtk_tree_store_remove(GTK_TREE_STORE(model), &parent); } /** * 从好友树(paltree)中删除所有好友数据. */ void MainWindow::ClearAllItemFromPaltree() { GtkTreeModel *model; model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "regular-paltree-model")); gtk_tree_store_clear(GTK_TREE_STORE(model)); model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "segment-paltree-model")); gtk_tree_store_clear(GTK_TREE_STORE(model)); model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "group-paltree-model")); gtk_tree_store_clear(GTK_TREE_STORE(model)); model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "broadcast-paltree-model")); gtk_tree_store_clear(GTK_TREE_STORE(model)); } /** * 让指定的项在好友树(paltree)中闪烁. * @param grpinf class GroupInfo * @param blinking 是否继续闪烁 * @note 如果我猜得没错,调用此函数的环境一定已经对(grpinf)加锁了 */ void MainWindow::MakeItemBlinking(GroupInfo *grpinf, bool blinking) { GtkTreeModel *model; GtkTreeIter iter; GroupInfo *pgrpinf; /* 成员为空表明此项已经不存在model中,也就没必要再处理它了 */ if (!grpinf->member) return; /* 闪烁项 */ switch (grpinf->type) { case GROUP_BELONG_TYPE_REGULAR: /* 闪烁常规模式树 */ model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "regular-paltree-model")); GroupGetPaltreeItem(model, &iter, grpinf); BlinkGroupItemToPaltree(model, &iter, blinking); /* 闪烁网段模式树 */ model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "segment-paltree-model")); pgrpinf = cthrd.GetPalSegmentItem((PalInfo *)grpinf->member->data); GroupGetPaltreeItem(model, &iter, pgrpinf); GroupGetPaltreeItemWithParent(model, &iter, grpinf); BlinkGroupItemToPaltree(model, &iter, blinking); /* 闪烁分组模式树 */ model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "group-paltree-model")); pgrpinf = cthrd.GetPalGroupItem((PalInfo *)grpinf->member->data); GroupGetPaltreeItem(model, &iter, pgrpinf); GroupGetPaltreeItemWithParent(model, &iter, grpinf); BlinkGroupItemToPaltree(model, &iter, blinking); /* 闪烁广播模式树 */ model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "broadcast-paltree-model")); pgrpinf = cthrd.GetPalBroadcastItem((PalInfo *)grpinf->member->data); GroupGetPaltreeItem(model, &iter, pgrpinf); GroupGetPaltreeItemWithParent(model, &iter, grpinf); BlinkGroupItemToPaltree(model, &iter, blinking); break; case GROUP_BELONG_TYPE_SEGMENT: /* 闪烁网段模式树 */ model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "segment-paltree-model")); GroupGetPaltreeItem(model, &iter, grpinf); BlinkGroupItemToPaltree(model, &iter, blinking); break; case GROUP_BELONG_TYPE_GROUP: /* 闪烁分组模式树 */ model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "group-paltree-model")); GroupGetPaltreeItem(model, &iter, grpinf); BlinkGroupItemToPaltree(model, &iter, blinking); break; case GROUP_BELONG_TYPE_BROADCAST: /* 闪烁广播模式树 */ model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "broadcast-paltree-model")); GroupGetPaltreeItem(model, &iter, grpinf); BlinkGroupItemToPaltree(model, &iter, blinking); break; default: break; } } /** * 打开文件传输窗口. */ void MainWindow::OpenTransWindow() { ShowTransWindow(&widset); } /** * 更新文件传输树(trans-tree)的指定项. * @param para 项值 * @note 若项不存在则须自动加入 */ void MainWindow::UpdateItemToTransTree(GData **para) { GtkTreeModel *model; GtkTreeIter iter; gpointer data; /* 查询项所在位置,若不存在则自动加入 */ data = NULL; model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "trans-model")); if (gtk_tree_model_get_iter_first(model, &iter)) { do { gtk_tree_model_get(model, &iter, TRANS_TREE_MAX, &data, -1); if (para == data) break; } while (gtk_tree_model_iter_next(model, &iter)); } if (para != data) { gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, TRANS_TREE_MAX, para, -1); } /** * @note 鉴于参数值(*para)的原地址有可能会被重用, 所以当("data"==null) * 时应该清空参数指针值,以防止其他后来项误认此项为自己的大本营. */ if (!g_datalist_get_data(para, "data")) gtk_list_store_set(GTK_LIST_STORE(model), &iter, TRANS_TREE_MAX, NULL, -1); /* 重设数据 */ gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, g_datalist_get_data(para, "status"), 1, g_datalist_get_data(para, "task"), 2, g_datalist_get_data(para, "peer"), 3, g_datalist_get_data(para, "ip"), 4, g_datalist_get_data(para, "filename"), 5, g_datalist_get_data(para, "filelength"), 6, g_datalist_get_data(para, "finishlength"), 7, GPOINTER_TO_INT(g_datalist_get_data(para, "progress")), 8, g_datalist_get_data(para, "pro-text"), 9, g_datalist_get_data(para, "cost"), 10, g_datalist_get_data(para, "remain"), 11, g_datalist_get_data(para, "rate"), 12,g_datalist_get_data(para, "filepath"), 13, g_datalist_get_data(para, "data"),-1); } /** * 查询此刻是否存在活动的文件传输. * @return 活动与否 */ bool MainWindow::TransmissionActive() { GtkTreeModel *model; GtkTreeIter iter; gpointer data; data = NULL; model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "trans-model")); if (gtk_tree_model_get_iter_first(model, &iter)) { do { gtk_tree_model_get(model, &iter, TRANS_TREE_MAX, &data, -1); if (data) break; } while (gtk_tree_model_iter_next(model, &iter)); } return data; } /** * 初始化底层数据. */ void MainWindow::InitSublayer() { GtkTreeModel *model; g_datalist_init(&widset); g_datalist_init(&mdlset); g_datalist_init(&dtset); accel = gtk_accel_group_new(); timerid = gdk_threads_add_timeout(1000, GSourceFunc(UpdateUI), this); model = CreatePaltreeModel(); g_datalist_set_data_full(&mdlset, "regular-paltree-model", model, GDestroyNotify(g_object_unref)); tmdllist = g_list_append(tmdllist, model); model = CreatePaltreeModel(); g_datalist_set_data_full(&mdlset, "segment-paltree-model", model, GDestroyNotify(g_object_unref)); tmdllist = g_list_append(tmdllist, model); model = CreatePaltreeModel(); g_datalist_set_data_full(&mdlset, "group-paltree-model", model, GDestroyNotify(g_object_unref)); tmdllist = g_list_append(tmdllist, model); model = CreatePaltreeModel(); g_datalist_set_data_full(&mdlset, "broadcast-paltree-model", model, GDestroyNotify(g_object_unref)); tmdllist = g_list_append(tmdllist, model); model = CreatePallistModel(); g_datalist_set_data_full(&mdlset, "pallist-model", model, GDestroyNotify(g_object_unref)); model = CreateTransModel(); g_datalist_set_data_full(&mdlset, "trans-model", model, GDestroyNotify(g_object_unref)); } /** * 清空底层数据. */ void MainWindow::ClearSublayer() { g_datalist_clear(&widset); g_datalist_clear(&mdlset); g_datalist_clear(&dtset); g_list_free(tmdllist); if (accel) g_object_unref(accel); if (timerid > 0) g_source_remove(timerid); } /** * 读取窗口的UI布局数据. */ void MainWindow::ReadUILayout() { GConfClient *client; gint numeric; client = gconf_client_get_default(); numeric = gconf_client_get_int(client, GCONF_PATH "/main_window_width", NULL); numeric = numeric ? numeric : 250; g_datalist_set_data(&dtset, "main-window-width", GINT_TO_POINTER(numeric)); numeric = gconf_client_get_int(client, GCONF_PATH "/main_window_height", NULL); numeric = numeric ? numeric : 510; g_datalist_set_data(&dtset, "main-window-height", GINT_TO_POINTER(numeric)); numeric = gconf_client_get_int(client, GCONF_PATH "/mwin_main_paned_divide", NULL); numeric = numeric ? numeric : 210; g_datalist_set_data(&dtset, "mwin-main-paned-divide", GINT_TO_POINTER(numeric)); numeric = gconf_client_get_int(client, GCONF_PATH "/trans_window_width", NULL); numeric = numeric ? numeric : 500; g_datalist_set_data(&dtset, "trans-window-width", GINT_TO_POINTER(numeric)); numeric = gconf_client_get_int(client, GCONF_PATH "/trans_window_height", NULL); numeric = numeric ? numeric : 350; g_datalist_set_data(&dtset, "trans-window-height", GINT_TO_POINTER(numeric)); g_object_unref(client); } /** * 写出窗口的UI布局数据. */ void MainWindow::WriteUILayout() { GConfClient *client; gint numeric; client = gconf_client_get_default(); numeric = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "main-window-width")); gconf_client_set_int(client, GCONF_PATH "/main_window_width", numeric, NULL); numeric = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "main-window-height")); gconf_client_set_int(client, GCONF_PATH "/main_window_height", numeric, NULL); numeric = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "mwin-main-paned-divide")); gconf_client_set_int(client, GCONF_PATH "/mwin_main_paned_divide", numeric, NULL); numeric = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "trans-window-width")); gconf_client_set_int(client, GCONF_PATH "/trans_window_width", numeric, NULL); numeric = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "trans-window-height")); gconf_client_set_int(client, GCONF_PATH "/trans_window_height", numeric, NULL); g_object_unref(client); } /** * 创建主窗口. * @return 主窗口 */ GtkWidget *MainWindow::CreateMainWindow() { GdkGeometry geometry = {50, 200, G_MAXINT, G_MAXINT, 0, 0, 2, 5, 0.0, 0.0, GDK_GRAVITY_NORTH_WEST}; GdkWindowHints hints = GdkWindowHints(GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE | GDK_HINT_BASE_SIZE | GDK_HINT_RESIZE_INC | GDK_HINT_WIN_GRAVITY | GDK_HINT_USER_POS | GDK_HINT_USER_SIZE); GtkWidget *window; gint width, height; window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), _("iptux")); width = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "main-window-width")); height = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "main-window-height")); gtk_window_set_default_size(GTK_WINDOW(window), width, height); gtk_window_set_geometry_hints(GTK_WINDOW(window), window, &geometry, hints); gtk_window_set_default_icon_name("ip-tux"); gtk_window_add_accel_group(GTK_WINDOW(window), accel); g_datalist_set_data(&widset, "window-widget", window); g_signal_connect_swapped(window, "delete-event", G_CALLBACK(alter_interface_mode), NULL); g_signal_connect(window, "configure-event", G_CALLBACK(MWinConfigureEvent), &dtset); return window; } /** * 创建文件传输主窗口. * @return 主窗口 */ GtkWidget *MainWindow::CreateTransWindow() { GtkWidget *window; gint width, height; window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), _("Files Transmission Management")); width = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "trans-window-width")); height = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "trans-window-height")); gtk_window_set_default_size(GTK_WINDOW(window), width, height); gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER); gtk_container_set_border_width(GTK_CONTAINER(window), 5); g_signal_connect_swapped(window, "delete-event", G_CALLBACK(HideTransWindow), &widset); g_signal_connect(window, "configure-event", G_CALLBACK(TWinConfigureEvent), &dtset); g_datalist_set_data(&widset, "trans-window-widget", window); return window; } /** * 创建所有区域. * @return 主窗体 */ GtkWidget *MainWindow::CreateAllArea() { GtkWidget *box, *paned; gint position; box = gtk_vbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(box), CreateMenuBar(), FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(box), CreateToolBar(), FALSE, FALSE, 0); paned = gtk_vpaned_new(); g_object_set_data(G_OBJECT(paned), "position-name", (gpointer)"mwin-main-paned-divide"); position = GPOINTER_TO_INT(g_datalist_get_data(&dtset, "mwin-main-paned-divide")); gtk_paned_set_position(GTK_PANED(paned), position); gtk_container_set_border_width(GTK_CONTAINER(paned), 4); gtk_box_pack_start(GTK_BOX(box), paned, TRUE, TRUE, 0); g_signal_connect(paned, "notify::position", G_CALLBACK(PanedDivideChanged), &dtset); gtk_paned_pack1(GTK_PANED(paned), CreatePaltreeArea(), TRUE, TRUE); gtk_paned_pack2(GTK_PANED(paned), CreatePallistArea(), FALSE, TRUE); return box; } /** * 创建文件传输窗口其他区域. * @return 主窗体 */ GtkWidget *MainWindow::CreateTransArea() { GtkWidget *box, *hbb; GtkWidget *sw, *button, *widget; GtkTreeModel *model; box = gtk_vbox_new(FALSE, 0); sw = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_box_pack_start(GTK_BOX(box), sw, TRUE, TRUE, 0); model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "trans-model")); widget = CreateTransTree(model); gtk_container_add(GTK_CONTAINER(sw), widget); g_datalist_set_data(&widset, "trans-treeview-widget", widget); hbb = gtk_hbutton_box_new(); gtk_button_box_set_layout(GTK_BUTTON_BOX(hbb), GTK_BUTTONBOX_END); gtk_box_pack_start(GTK_BOX(box), hbb, FALSE, FALSE, 0); button = gtk_button_new_from_stock(GTK_STOCK_CLEAR); gtk_box_pack_start(GTK_BOX(hbb), button, FALSE, FALSE, 0); g_signal_connect_swapped(button, "clicked", G_CALLBACK(ClearTransWindow), &widset); return box; } /** * 创建菜单条. * @return 菜单条 */ GtkWidget *MainWindow::CreateMenuBar() { GtkWidget *menubar; menubar = gtk_menu_bar_new(); gtk_menu_shell_append(GTK_MENU_SHELL(menubar), CreateFileMenu()); gtk_menu_shell_append(GTK_MENU_SHELL(menubar), CreateToolMenu()); gtk_menu_shell_append(GTK_MENU_SHELL(menubar), CreateHelpMenu()); return menubar; } /** * 创建工具条. * @return 工具条 */ GtkWidget *MainWindow::CreateToolBar() { GtkWidget *toolbar; GtkToolItem *toolitem; GtkWidget *widget; toolbar = gtk_toolbar_new(); g_object_set(toolbar, "icon-size", 1, NULL); gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS); toolitem = gtk_tool_button_new_from_stock(GTK_STOCK_GO_BACK); gtk_toolbar_insert(GTK_TOOLBAR(toolbar), toolitem, -1); g_signal_connect_swapped(toolitem, "clicked", G_CALLBACK(GoPrevTreeModel), this); toolitem = gtk_tool_item_new(); gtk_tool_item_set_expand(toolitem, TRUE); gtk_toolbar_insert(GTK_TOOLBAR(toolbar), toolitem, -1); widget = gtk_label_new(_("Pals Online: 0")); gtk_container_add(GTK_CONTAINER(toolitem), widget); g_datalist_set_data(&widset, "online-label-widget", widget); toolitem = gtk_tool_button_new_from_stock(GTK_STOCK_GO_FORWARD); gtk_toolbar_insert(GTK_TOOLBAR(toolbar), toolitem, -1); g_signal_connect_swapped(toolitem, "clicked", G_CALLBACK(GoNextTreeModel), this); return toolbar; } /** * 创建好友树区域. * @return 主窗体 */ GtkWidget *MainWindow::CreatePaltreeArea() { GtkWidget *sw; GtkWidget *widget; GtkTreeModel *model; sw = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "regular-paltree-model")); widget = CreatePaltreeTree(model); g_object_set_data(G_OBJECT(widget), "paltree-model", model); gtk_container_add(GTK_CONTAINER(sw), widget); g_datalist_set_data(&widset, "paltree-treeview-widget", widget); return sw; } /** * 创建好友清单区域. * @return 主窗体 */ GtkWidget *MainWindow::CreatePallistArea() { GtkWidget *box, *hbox; GtkWidget *sw, *button, *widget; GtkTreeModel *model; box = gtk_vbox_new(FALSE, 0); g_datalist_set_data(&widset, "pallist-box-widget", box); /* 创建好友清单部分 */ sw = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_box_pack_start(GTK_BOX(box), sw, TRUE, TRUE, 0); model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "pallist-model")); widget = CreatePallistTree(model); gtk_container_add(GTK_CONTAINER(sw), widget); g_datalist_set_data(&widset, "pallist-treeview-widget", widget); /* 创建接受搜索输入部分 */ hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); /*/* 关闭按钮 */ button = gtk_button_new(); widget = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_BUTTON); gtk_button_set_image(GTK_BUTTON(button), widget); g_object_set(button, "relief", GTK_RELIEF_NONE, NULL); gtk_widget_set_size_request(button, -1, 1); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); g_signal_connect_swapped(button, "clicked", G_CALLBACK(HidePallistArea), &widset); /*/* 输入框 */ widget = gtk_entry_new(); gtk_entry_set_activates_default(GTK_ENTRY(widget), TRUE); #if GTK_CHECK_VERSION(2,16,0) gtk_entry_set_icon_from_stock(GTK_ENTRY(widget), GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_FIND); #endif gtk_widget_add_events(widget, GDK_KEY_PRESS_MASK); g_object_set(widget, "has-tooltip", TRUE, NULL); gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 0); g_signal_connect(widget, "query-tooltip", G_CALLBACK(entry_query_tooltip), _("Search Pals")); g_signal_connect(widget, "key-press-event", G_CALLBACK(ClearPallistEntry), NULL); g_signal_connect(widget, "changed", G_CALLBACK(PallistEntryChanged), &widset); g_datalist_set_data(&widset, "pallist-entry-widget", widget); return box; } /** * 创建文件菜单. * @return 菜单 */ GtkWidget *MainWindow::CreateFileMenu() { GtkWidget *menushell, *window; GtkWidget *menu, *menuitem; GtkWidget *image; menushell = gtk_menu_item_new_with_mnemonic(_("_File")); window = GTK_WIDGET(g_datalist_get_data(&widset, "window-widget")); menu = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menushell), menu); menuitem = gtk_image_menu_item_new_with_mnemonic(_("_Detect")); image = gtk_image_new_from_icon_name("menu-detect", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(DetectPal::DetectEntry), window); gtk_widget_add_accelerator(menuitem, "activate", accel, GDK_D, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); menuitem = gtk_image_menu_item_new_with_mnemonic(_("_Find")); image = gtk_image_new_from_stock(GTK_STOCK_FIND, GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(ShowPallistArea), &widset); gtk_widget_add_accelerator(menuitem, "activate", accel, GDK_F, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); menuitem = gtk_separator_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); menuitem = gtk_image_menu_item_new_with_mnemonic(_("_Quit")); image = gtk_image_new_from_stock(GTK_STOCK_QUIT, GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect(menuitem, "activate", G_CALLBACK(iptux_gui_quit), NULL); return menushell; } /** * 创建工具菜单. * @return 菜单 */ GtkWidget *MainWindow::CreateToolMenu() { GtkWidget *menushell, *window; GtkWidget *menu, *submenu, *menuitem; GtkWidget *image; window = GTK_WIDGET(g_datalist_get_data(&widset, "window-widget")); menushell = gtk_menu_item_new_with_mnemonic(_("_Tools")); menu = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menushell), menu); /* 参数设置 */ NO_OPERATION_C menuitem = gtk_image_menu_item_new_with_mnemonic(_("_Preferences")); image = gtk_image_new_from_stock(GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(DataSettings::ResetDataEntry), window); /* 文件传输 */ NO_OPERATION_C menuitem = gtk_image_menu_item_new_with_mnemonic(_("_Transmission")); image = gtk_image_new_from_stock(GTK_STOCK_CONNECT, GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(ShowTransWindow), &widset); /* 文件共享 */ NO_OPERATION_C menuitem = gtk_image_menu_item_new_with_mnemonic(_("_Shared Management")); image = gtk_image_new_from_icon_name("menu-share", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(ShareFile::ShareEntry), window); /* 群组成员排序 */ NO_OPERATION_C menuitem = gtk_image_menu_item_new_with_mnemonic(_("_Sort")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); submenu = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), submenu); /*/* 按昵称排序 */ NO_OPERATION_C menuitem = gtk_radio_menu_item_new_with_label(NULL, _("By Nickname")); g_object_set_data(G_OBJECT(menuitem), "compare-func", (gpointer)PaltreeCompareByNameFunc); gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menuitem); g_signal_connect(menuitem, "toggled", G_CALLBACK(SetPaltreeSortFunc), &mdlset); /*/* 按IP地址排序 */ menuitem = gtk_radio_menu_item_new_with_label_from_widget( GTK_RADIO_MENU_ITEM(menuitem), _("By IP")); g_object_set_data(G_OBJECT(menuitem), "compare-func", (gpointer)PaltreeCompareByIPFunc); gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menuitem); g_signal_connect(menuitem, "toggled", G_CALLBACK(SetPaltreeSortFunc), &mdlset); /*/* 分割符 */ menuitem = gtk_separator_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menuitem); /*/* 升序 */ NO_OPERATION_C menuitem = gtk_radio_menu_item_new_with_label(NULL, _("Ascending")); g_object_set_data(G_OBJECT(menuitem), "sort-type", GINT_TO_POINTER(GTK_SORT_ASCENDING)); gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menuitem); g_signal_connect(menuitem, "toggled", G_CALLBACK(SetPaltreeSortType), &mdlset); /*/* 降序 */ menuitem = gtk_radio_menu_item_new_with_label_from_widget( GTK_RADIO_MENU_ITEM(menuitem), _("Descending")); g_object_set_data(G_OBJECT(menuitem), "sort-type", GINT_TO_POINTER(GTK_SORT_DESCENDING)); gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menuitem); g_signal_connect(menuitem, "toggled", G_CALLBACK(SetPaltreeSortType), &mdlset); /* 更新成员 */ NO_OPERATION_C menuitem = gtk_image_menu_item_new_with_mnemonic(_("_Update")); image = gtk_image_new_from_stock(GTK_STOCK_REFRESH, GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(UpdatePalTree), this); gtk_widget_add_accelerator(menuitem, "activate", accel, GDK_F5, GdkModifierType(0), GTK_ACCEL_VISIBLE); return menushell; } /** * 创建帮助菜单. * @return 菜单 */ GtkWidget *MainWindow::CreateHelpMenu() { const char *faq = _("http://code.google.com/p/iptux/wiki/FAQ?wl=en"); GtkWidget *menushell; GtkWidget *menu, *menuitem; menushell = gtk_menu_item_new_with_mnemonic(_("_Help")); menu = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menushell), menu); menuitem = gtk_image_menu_item_new_from_stock(GTK_STOCK_ABOUT, accel); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect(menuitem, "activate", G_CALLBACK(HelpDialog::AboutEntry), NULL); menuitem = gtk_image_menu_item_new_with_mnemonic(_("_More")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect(menuitem, "activate", G_CALLBACK(HelpDialog::MoreEntry), NULL); menuitem = gtk_image_menu_item_new_with_mnemonic(_("_FAQ")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(iptux_open_url), (gpointer)faq); return menushell; } /** * 好友树(paltree)底层数据结构. * 7,0 closed-expander,1 open-expander,2 info.,3 extras,4 style,5 color,6 data \n * 关闭的展开器;打开的展开器;群组信息;扩展信息;字体风格;字体颜色;群组数据 \n * @return paltree-model */ GtkTreeModel *MainWindow::CreatePaltreeModel() { GtkTreeStore *model; model = gtk_tree_store_new(7, GDK_TYPE_PIXBUF, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, PANGO_TYPE_ATTR_LIST, GDK_TYPE_COLOR, G_TYPE_POINTER); gtk_tree_sortable_set_default_sort_func(GTK_TREE_SORTABLE(model), GtkTreeIterCompareFunc(PaltreeCompareByNameFunc), NULL, NULL); gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(model), GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, GTK_SORT_ASCENDING); return GTK_TREE_MODEL(model); } /** * 好友清单(pallist)底层数据结构. * 7,0 icon,1 name,2 group,3 ipstr,4 user,5 host,6 data \n * 好友头像;好友昵称;好友群组;IP地址串;好友用户;好友主机;好友数据 \n * @return pallist-model * @note 鉴于好友清单(pallist)常年保持隐藏状态,所以请不要有事没事就往 * 此model中填充数据,好友清单也无须与好友最新状态保持同步. */ GtkTreeModel *MainWindow::CreatePallistModel() { GtkListStore *model; model = gtk_list_store_new(7, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER); return GTK_TREE_MODEL(model); } /** * 文件传输树(trans-tree)底层数据结构. * 14,0 status,1 task,2 peer,3 ip,4 filename,5 filelength,6 finishlength,7 progress, * 8 pro-text,9 cost,10 remain,11 rate,12,pathname,13 data,14 para \n * 任务状态;任务类型;任务对端;文件名(如果当前是文件夹,该项指正在传输的文件夹内单个文件, * 整个文件夹传输完成后,该项指向当前是文件夹);文件长度;完成长度;完成进度; * 进度串;已花费时间;任务剩余时间;传输速度;带路径文件名(不显示);文件传输类;参数指针值 \n * @return trans-model */ GtkTreeModel *MainWindow::CreateTransModel() { GtkListStore *model; model = gtk_list_store_new(15, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING,G_TYPE_STRING,G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,G_TYPE_STRING, G_TYPE_POINTER,G_TYPE_POINTER); return GTK_TREE_MODEL(model); } /** * 创建好友树(paltree). * @param model paltree-model * @return 好友树 */ GtkWidget *MainWindow::CreatePaltreeTree(GtkTreeModel *model) { GtkWidget *view; GtkTreeSelection *selection; GtkTreeViewColumn *column; GtkCellRenderer *cell; view = gtk_tree_view_new_with_model(model); gtk_tree_view_set_level_indentation(GTK_TREE_VIEW(view), 10); gtk_tree_view_set_show_expanders(GTK_TREE_VIEW(view), FALSE); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(view), FALSE); widget_enable_dnd_uri(view); g_object_set(view, "has-tooltip", TRUE, NULL); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(view)); gtk_tree_selection_set_mode(GTK_TREE_SELECTION(selection), GTK_SELECTION_NONE); column = gtk_tree_view_column_new(); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); g_object_set_data(G_OBJECT(view), "info-column", column); /* 展开器区域 */ cell = gtk_cell_renderer_pixbuf_new(); g_object_set(cell, "follow-state", TRUE, NULL); gtk_tree_view_column_pack_start(column, cell, FALSE); gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column), cell, "pixbuf", 0, "pixbuf-expander-closed", 0, "pixbuf-expander-open", 1, NULL); g_object_set_data(G_OBJECT(column), "expander-cell", cell); /* 群组信息区域 */ cell = gtk_cell_renderer_text_new(); g_object_set(cell, "xalign", 0.0, "wrap-mode", PANGO_WRAP_WORD, NULL); gtk_tree_view_column_pack_start(column, cell, FALSE); gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column), cell, "text", 2, "attributes", 4, "foreground-gdk", 5, NULL); /* 扩展信息区域 */ cell = gtk_cell_renderer_text_new(); g_object_set(cell, "xalign", 0.0, "wrap-mode", PANGO_WRAP_WORD, NULL); gtk_tree_view_column_pack_start(column, cell, FALSE); gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column), cell, "text", 3, "attributes", 4, "foreground-gdk", 5, NULL); /* 连接信号 */ g_signal_connect(view, "query-tooltip", G_CALLBACK(PaltreeQueryTooltip), NULL); g_signal_connect(view, "row-activated", G_CALLBACK(PaltreeItemActivated), NULL); g_signal_connect(view, "drag-data-received", G_CALLBACK(PaltreeDragDataReceived), NULL); g_signal_connect(view, "button-press-event", G_CALLBACK(PaltreePopupMenu), NULL); g_signal_connect(view, "button-release-event", G_CALLBACK(PaltreeChangeStatus), NULL); return view; } /** * 创建好友清单(pallist). * @param model pallist-model * @return 好友清单 */ GtkWidget *MainWindow::CreatePallistTree(GtkTreeModel *model) { GtkWidget *view; GtkTreeViewColumn *column; GtkCellRenderer *cell; GtkTreeSelection *selection; view = gtk_tree_view_new_with_model(model); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(view), TRUE); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(view), TRUE); widget_enable_dnd_uri(view); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(view)); gtk_tree_selection_set_mode(GTK_TREE_SELECTION(selection), GTK_SELECTION_NONE); column = gtk_tree_view_column_new(); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_column_set_title(column, _("Nickname")); cell = gtk_cell_renderer_pixbuf_new(); g_object_set(cell, "follow-state", TRUE, NULL); gtk_tree_view_column_pack_start(column, cell, FALSE); gtk_tree_view_column_set_attributes(column, cell, "pixbuf", 0, NULL); cell = gtk_cell_renderer_text_new(); gtk_tree_view_column_pack_start(column, cell, FALSE); gtk_tree_view_column_set_attributes(column, cell, "text", 1, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Group"), cell, "text", 2, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("IPv4"), cell, "text", 3, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("User"), cell, "text", 4, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Host"), cell, "text", 5, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); g_signal_connect(view, "row-activated", G_CALLBACK(PallistItemActivated), NULL); g_signal_connect(view, "drag-data-received", G_CALLBACK(PallistDragDataReceived), NULL); return view; } /** * 创建文件传输树(trans-tree). * @param model trans-model * @return 传输树 */ GtkWidget *MainWindow::CreateTransTree(GtkTreeModel *model) { GtkWidget *view; GtkTreeViewColumn *column; GtkCellRenderer *cell; GtkTreeSelection *selection; view = gtk_tree_view_new_with_model(model); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(view), TRUE); gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(view), TRUE); gtk_tree_view_set_rubber_banding(GTK_TREE_VIEW(view), TRUE); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(view)); gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE); g_signal_connect(view, "button-press-event", G_CALLBACK(TransPopupMenu), NULL); cell = gtk_cell_renderer_pixbuf_new(); column = gtk_tree_view_column_new_with_attributes(_("State"), cell, "pixbuf", 0, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Task"), cell, "text", 1, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Peer"), cell, "text", 2, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("IPv4"), cell, "text", 3, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Filename"), cell, "text", 4, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Size"), cell, "text", 5, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Completed"), cell, "text", 6, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_progress_new(); column = gtk_tree_view_column_new_with_attributes(_("Progress"), cell, "value", 7, "text", 8, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Cost"), cell, "text", 9, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Remaining"), cell, "text", 10, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Rate"), cell, "text", 11, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); return view; } /** * 获取项(grpinf)在数据集(model)中的当前位置. * @param model model * @param iter 位置由此返回 * @param grpinf class GroupInfo * @return 是否查找成功 */ bool MainWindow::GroupGetPrevPaltreeItem(GtkTreeModel *model, GtkTreeIter *iter, GroupInfo *grpinf) { GroupInfo *pgrpinf; GtkTreeIter parent; if (!gtk_tree_model_get_iter_first(model, &parent)) return false; do { gtk_tree_model_get(model, &parent, 6, &pgrpinf, -1); if (pgrpinf->grpid == grpinf->grpid) { *iter = parent; break; } if (!gtk_tree_model_iter_children(model, iter, &parent)) continue; do { gtk_tree_model_get(model, iter, 6, &pgrpinf, -1); if (pgrpinf->grpid == grpinf->grpid) break; } while (gtk_tree_model_iter_next(model, iter)); if (pgrpinf->grpid == grpinf->grpid) break; } while (gtk_tree_model_iter_next(model, &parent)); return (pgrpinf->grpid == grpinf->grpid); } /** * 获取项(grpinf)在数据集(model)中的位置. * @param model model * @param iter 位置由此返回 * @param grpinf class GroupInfo * @return 是否查找成功 */ bool MainWindow::GroupGetPaltreeItem(GtkTreeModel *model, GtkTreeIter *iter, GroupInfo *grpinf) { GroupInfo *pgrpinf; if (!gtk_tree_model_get_iter_first(model, iter)) return false; do { gtk_tree_model_get(model, iter, 6, &pgrpinf, -1); if (pgrpinf->grpid == grpinf->grpid) break; } while (gtk_tree_model_iter_next(model, iter)); return (pgrpinf->grpid == grpinf->grpid); } /** * 获取项(grpinf)在数据集(model)中的位置. * @param model model * @param iter 父节点位置/位置由此返回 * @param grpinf class GroupInfo * @return 是否查找成功 */ bool MainWindow::GroupGetPaltreeItemWithParent(GtkTreeModel *model, GtkTreeIter *iter, GroupInfo *grpinf) { GtkTreeIter parent; GroupInfo *pgrpinf; parent = *iter; if (!gtk_tree_model_iter_children(model, iter, &parent)) return false; do { gtk_tree_model_get(model, iter, 6, &pgrpinf, -1); if (pgrpinf->grpid == grpinf->grpid) break; } while (gtk_tree_model_iter_next(model, iter)); return (pgrpinf->grpid == grpinf->grpid); } /** * 填充群组数据(grpinf)到数据集(model)指定位置(iter). * @param model model * @param iter iter * @param grpinf class GroupInfo */ void MainWindow::FillGroupInfoToPaltree(GtkTreeModel *model, GtkTreeIter *iter, GroupInfo *grpinf) { static GdkColor color = {0xff, 0x5252, 0xb8b8, 0x3838}; GtkIconTheme *theme; GdkPixbuf *cpixbuf, *opixbuf; PangoAttrList *attrs; PangoAttribute *attr; PangoFontDescription *dspt; char ipstr[INET_ADDRSTRLEN]; gchar *file, *info, *extra; PalInfo *pal; /* 创建图标 */ theme = gtk_icon_theme_get_default(); if (grpinf->type == GROUP_BELONG_TYPE_REGULAR) { pal = (PalInfo *)grpinf->member->data; file = iptux_erase_filename_suffix(pal->iconfile); cpixbuf = gtk_icon_theme_load_icon(theme, file, MAX_ICONSIZE, GtkIconLookupFlags(0), NULL); opixbuf = GDK_PIXBUF(g_object_ref(cpixbuf)); g_free(file); } else { cpixbuf = gtk_icon_theme_load_icon(theme, "tip-hide", MAX_ICONSIZE, GtkIconLookupFlags(0), NULL); opixbuf = gtk_icon_theme_load_icon(theme, "tip-show", MAX_ICONSIZE, GtkIconLookupFlags(0), NULL); } /* 创建主信息 */ if (grpinf->type == GROUP_BELONG_TYPE_REGULAR) { pal = (PalInfo *)grpinf->member->data; inet_ntop(AF_INET, &pal->ipv4, ipstr, INET_ADDRSTRLEN); info = g_strdup_printf("%s\n%s", pal->name, ipstr); } else info = g_strdup(grpinf->name); /* 创建扩展信息 */ if (grpinf->type == GROUP_BELONG_TYPE_REGULAR) extra = NULL; else extra = g_strdup_printf("(%u)", g_slist_length(grpinf->member)); /* 创建字体风格 */ attrs = pango_attr_list_new(); if (grpinf->type == GROUP_BELONG_TYPE_REGULAR) { dspt = pango_font_description_from_string(progdt.font); attr = pango_attr_font_desc_new(dspt); pango_attr_list_insert(attrs, attr); pango_font_description_free(dspt); } else { attr = pango_attr_size_new(8192); pango_attr_list_insert(attrs, attr); attr = pango_attr_style_new(PANGO_STYLE_ITALIC); pango_attr_list_insert(attrs, attr); attr = pango_attr_weight_new(PANGO_WEIGHT_BOLD); pango_attr_list_insert(attrs, attr); } /* 设置相应的数据 */ gtk_tree_store_set(GTK_TREE_STORE(model), iter, 0, cpixbuf, 1, opixbuf, 2, info, 3, extra, 4, attrs, 5, &color, 6, grpinf, -1); /* 释放资源 */ if (cpixbuf) g_object_unref(cpixbuf); if (opixbuf) g_object_unref(opixbuf); g_free(info); g_free(extra); pango_attr_list_unref(attrs); } /** * 更新群组数据(grpinf)到数据集(model)指定位置(iter). * @param model model * @param iter iter * @param grpinf class GroupInfo */ void MainWindow::UpdateGroupInfoToPaltree(GtkTreeModel *model, GtkTreeIter *iter, GroupInfo *grpinf) { GtkIconTheme *theme; GdkPixbuf *cpixbuf, *opixbuf; PangoAttrList *attrs; PangoAttribute *attr; PangoFontDescription *dspt; char ipstr[INET_ADDRSTRLEN]; gchar *file, *info, *extra; PalInfo *pal; /* 创建图标 */ cpixbuf = opixbuf = NULL; theme = gtk_icon_theme_get_default(); if (grpinf->type == GROUP_BELONG_TYPE_REGULAR) { pal = (PalInfo *)grpinf->member->data; file = iptux_erase_filename_suffix(pal->iconfile); cpixbuf = gtk_icon_theme_load_icon(theme, file, MAX_ICONSIZE, GtkIconLookupFlags(0), NULL); opixbuf = GDK_PIXBUF(g_object_ref(cpixbuf)); g_free(file); } /* 创建主信息 */ info = NULL; if (grpinf->type == GROUP_BELONG_TYPE_REGULAR) { pal = (PalInfo *)grpinf->member->data; inet_ntop(AF_INET, &pal->ipv4, ipstr, INET_ADDRSTRLEN); info = g_strdup_printf("%s\n%s", pal->name, ipstr); } /* 创建扩展信息 */ extra = NULL; if (grpinf->type != GROUP_BELONG_TYPE_REGULAR) extra = g_strdup_printf("(%u)", g_slist_length(grpinf->member)); /* 创建字体风格 */ attrs = NULL; if (grpinf->type == GROUP_BELONG_TYPE_REGULAR) { attrs = pango_attr_list_new(); dspt = pango_font_description_from_string(progdt.font); attr = pango_attr_font_desc_new(dspt); pango_attr_list_insert(attrs, attr); pango_font_description_free(dspt); } /* 设置相应的数据 */ if (grpinf->type == GROUP_BELONG_TYPE_REGULAR) gtk_tree_store_set(GTK_TREE_STORE(model), iter, 0, cpixbuf, 1, opixbuf, 2, info, 4, attrs, -1); else gtk_tree_store_set(GTK_TREE_STORE(model), iter, 3, extra, -1); /* 释放资源 */ if (cpixbuf) g_object_unref(cpixbuf); if (opixbuf) g_object_unref(opixbuf); g_free(info); g_free(extra); if (attrs) pango_attr_list_unref(attrs); } /** * 闪烁指定项. * @param model model * @param iter iter * @param blinking 是否继续闪烁 */ void MainWindow::BlinkGroupItemToPaltree(GtkTreeModel *model, GtkTreeIter *iter, bool blinking) { static GdkColor color1 = {0xff, 0x5252, 0xb8b8, 0x3838}, color2 = {0xff, 0x0000, 0x0000, 0xffff}; GdkColor *color; if (blinking) { gtk_tree_model_get(model, iter, 5, &color, -1); if ((color->red == color1.red) && (color->green == color1.green) && (color->blue == color1.blue)) gtk_tree_store_set(GTK_TREE_STORE(model),iter, 5, &color2, -1); else gtk_tree_store_set(GTK_TREE_STORE(model),iter, 5, &color1, -1); } else gtk_tree_store_set(GTK_TREE_STORE(model), iter, 5, &color1, -1); } /** * 为文件传输树(trans-tree)创建弹出菜单. * @param model trans-model * @return 菜单 */ GtkWidget *MainWindow::CreateTransPopupMenu(GtkTreeModel *model) { GtkWidget *menu, *menuitem; GtkTreePath *path; GtkTreeIter iter; gchar *remaining; gboolean sensitive = TRUE; if (!(path = (GtkTreePath *)(g_object_get_data(G_OBJECT(model), "selected-path")))) return NULL; gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(model, &iter, 10, &remaining, -1); if (g_strcmp0(remaining,'\0')) sensitive = FALSE; menu = gtk_menu_new(); menuitem = gtk_menu_item_new_with_label(_("Open This File")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(OpenThisFile), model); gtk_widget_set_sensitive(GTK_WIDGET(menuitem),sensitive); menuitem = gtk_menu_item_new_with_label(_("Open Containing Folder")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(OpenContainingFolder), model); gtk_widget_set_sensitive(GTK_WIDGET(menuitem),sensitive); menuitem = gtk_menu_item_new_with_label(_("Terminate Task")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(TerminateTransTask), model); menuitem = gtk_menu_item_new_with_label(_("Terminate All")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(TerminateAllTransTask), model); menuitem = gtk_menu_item_new_with_label(_("Clear Tasklist")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(ClearTransTask), model); return menu; } /** * 为好友树(paltree)创建弹出菜单. * @param grpinf 好友群组信息 * @return 菜单 */ GtkWidget *MainWindow::CreatePaltreePopupMenu(GroupInfo *grpinf) { GtkWidget *menu, *menuitem; menu = gtk_menu_new(); /* 发送消息菜单 */ NO_OPERATION_C menuitem = gtk_menu_item_new_with_label(_("Send Message")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); switch (grpinf->type) { case GROUP_BELONG_TYPE_REGULAR: g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(DialogPeer::PeerDialogEntry), grpinf); break; case GROUP_BELONG_TYPE_SEGMENT: case GROUP_BELONG_TYPE_GROUP: case GROUP_BELONG_TYPE_BROADCAST: g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(DialogGroup::GroupDialogEntry), grpinf); break; default: gtk_widget_set_sensitive(menuitem, FALSE); break; } /* 请求共享文件菜单 */ NO_OPERATION_C menuitem = gtk_menu_item_new_with_label(_("Request Shared Resources")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); switch (grpinf->type) { case GROUP_BELONG_TYPE_REGULAR: g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(AskSharedFiles), grpinf); break; default: gtk_widget_set_sensitive(menuitem, FALSE); break; } /* 改变好友信息数据菜单 */ NO_OPERATION_C menuitem = gtk_menu_item_new_with_label(_("Change Info.")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); switch (grpinf->type) { case GROUP_BELONG_TYPE_REGULAR: g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(RevisePal::ReviseEntry), grpinf->member->data); break; default: gtk_widget_set_sensitive(menuitem, FALSE); break; } /* 删除好友项菜单 */ NO_OPERATION_C menuitem = gtk_menu_item_new_with_label(_("Delete Pal")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); switch (grpinf->type) { case GROUP_BELONG_TYPE_REGULAR: g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(DeletePalItem), grpinf); break; default: gtk_widget_set_sensitive(menuitem, FALSE); break; } return menu; } /** * 填充好友数据到TextBuffer. * @param buffer text-buffer * @param pal class PalInfo */ void MainWindow::FillPalInfoToBuffer(GtkTextBuffer *buffer, PalInfo *pal) { char buf[MAX_BUFLEN], ipstr[INET_ADDRSTRLEN]; GtkTextIter iter; gtk_text_buffer_get_end_iter(buffer, &iter); snprintf(buf, MAX_BUFLEN, _("Version: %s\n"), pal->version); gtk_text_buffer_insert(buffer, &iter, buf, -1); if (pal->group && *pal->group != '\0') snprintf(buf, MAX_BUFLEN, _("Nickname: %s@%s\n"), pal->name, pal->group); else snprintf(buf, MAX_BUFLEN, _("Nickname: %s\n"), pal->name); gtk_text_buffer_insert(buffer, &iter, buf, -1); snprintf(buf, MAX_BUFLEN, _("User: %s\n"), pal->user); gtk_text_buffer_insert(buffer, &iter, buf, -1); snprintf(buf, MAX_BUFLEN, _("Host: %s\n"), pal->host); gtk_text_buffer_insert(buffer, &iter, buf, -1); inet_ntop(AF_INET, &pal->ipv4, ipstr, INET_ADDRSTRLEN); if (pal->segdes && *pal->segdes != '\0') snprintf(buf, MAX_BUFLEN, _("Address: %s(%s)\n"), pal->segdes, ipstr); else snprintf(buf, MAX_BUFLEN, _("Address: %s\n"), ipstr); gtk_text_buffer_insert(buffer, &iter, buf, -1); if (!FLAG_ISSET(pal->flags, 0)) snprintf(buf, MAX_BUFLEN, _("Compatibility: Microsoft\n")); else snprintf(buf, MAX_BUFLEN, _("Compatibility: GNU/Linux\n")); gtk_text_buffer_insert(buffer, &iter, buf, -1); snprintf(buf, MAX_BUFLEN, _("System coding: %s\n"), pal->encode); gtk_text_buffer_insert(buffer, &iter, buf, -1); if (pal->sign && *pal->sign != '\0') { gtk_text_buffer_insert(buffer, &iter, _("Signature:\n"), -1); gtk_text_buffer_insert_with_tags_by_name(buffer, &iter, pal->sign, -1, "sign-words", NULL); } } /** * 更新UI. * @param mwin 主窗口类 * @return Gtk+库所需 */ gboolean MainWindow::UpdateUI(MainWindow *mwin) { static uint32_t sumonline = 0; //避免每次都作一次设置 GtkWidget *widget; char buf[MAX_BUFLEN]; uint32_t sum; GSList *tlist; /* 统计当前在线人数 */ sum = 0; tlist = cthrd.GetPalList(); while (tlist) { if (FLAG_ISSET(((PalInfo *)tlist->data)->flags, 1)) sum++; tlist = g_slist_next(tlist); } /* 更新UI */ if (sumonline != sum) { snprintf(buf, MAX_BUFLEN, _("Pals Online: %" PRIu32), sum); widget = GTK_WIDGET(g_datalist_get_data(&mwin->widset, "online-label-widget")); gtk_label_set_text(GTK_LABEL(widget), buf); sumonline = sum; } return TRUE; } /** * 转到上一类结构树. * @param mwin 主窗口类 */ void MainWindow::GoPrevTreeModel(MainWindow *mwin) { GtkWidget *widget; GtkTreeModel *model; GtkTreeViewColumn *column; GList *tlist; widget = GTK_WIDGET(g_datalist_get_data(&mwin->widset, "paltree-treeview-widget")); model = gtk_tree_view_get_model(GTK_TREE_VIEW(widget)); if ( (tlist = g_list_find(mwin->tmdllist, model))) { if (tlist->prev) model = GTK_TREE_MODEL(tlist->prev->data); else model = GTK_TREE_MODEL(g_list_last(mwin->tmdllist)->data); gtk_tree_view_set_model(GTK_TREE_VIEW(widget), model); } column = GTK_TREE_VIEW_COLUMN(g_object_get_data(G_OBJECT(widget), "info-column")); gtk_tree_view_column_queue_resize(column); } /** * 转到下一类结构树. * @param mwin 主窗口类 */ void MainWindow::GoNextTreeModel(MainWindow *mwin) { GtkWidget *widget; GtkTreeModel *model; GtkTreeViewColumn *column; GList *tlist; widget = GTK_WIDGET(g_datalist_get_data(&mwin->widset, "paltree-treeview-widget")); model = gtk_tree_view_get_model(GTK_TREE_VIEW(widget)); if ( (tlist = g_list_find(mwin->tmdllist, model))) { if (tlist->next) model = GTK_TREE_MODEL(tlist->next->data); else model = GTK_TREE_MODEL(mwin->tmdllist->data); gtk_tree_view_set_model(GTK_TREE_VIEW(widget), model); } column = GTK_TREE_VIEW_COLUMN(g_object_get_data(G_OBJECT(widget), "info-column")); gtk_tree_view_column_queue_resize(column); } /** * 更新文件传输窗口UI. * @param treeview tree-view * @return GLib库所需 */ gboolean MainWindow::UpdateTransUI(GtkWidget *treeview) { GtkTreeModel *model; GtkTreeIter iter; TransAbstract *trans; GData **para; /* 考察是否需要更新UI */ model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); if (!gtk_tree_model_get_iter_first(model, &iter)) return TRUE; /* 更新UI */ do { gtk_tree_model_get(model, &iter, TRANS_TREE_MAX - 1, &trans, -1); if (trans) { //当文件传输类存在时才能更新 para = trans->GetTransFilePara(); //获取参数 /* 更新数据 */ gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, g_datalist_get_data(para, "status"), 1, g_datalist_get_data(para, "task"), 2, g_datalist_get_data(para, "peer"), 3, g_datalist_get_data(para, "ip"), 4, g_datalist_get_data(para, "filename"), 5, g_datalist_get_data(para, "filelength"), 6, g_datalist_get_data(para, "finishlength"), 7, GPOINTER_TO_INT(g_datalist_get_data(para, "progress")), 8, g_datalist_get_data(para, "pro-text"), 9, g_datalist_get_data(para, "cost"), 10, g_datalist_get_data(para, "remain"), 11, g_datalist_get_data(para, "rate"), 13, g_datalist_get_data(para, "data"),-1); } } while (gtk_tree_model_iter_next(model, &iter)); /* 重新调整UI */ gtk_tree_view_columns_autosize(GTK_TREE_VIEW(treeview)); return TRUE; } /** * 文件传输树(trans-tree)弹出操作菜单. * @param treeview tree-view * @param event event * @return Gtk+库所需 */ gboolean MainWindow::TransPopupMenu(GtkWidget *treeview, GdkEventButton *event) { GtkWidget *menu; GtkTreeModel *model; GtkTreePath *path; /* 检查事件是否可用 */ if (event->button != 3) return FALSE; /* 确定当前被选中的路径 */ model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(treeview), GINT(event->x), GINT(event->y), &path, NULL, NULL, NULL)) g_object_set_data_full(G_OBJECT(model), "selected-path", path, GDestroyNotify(gtk_tree_path_free)); else g_object_set_data(G_OBJECT(model), "selected-path", NULL); /* 弹出菜单 */ menu = CreateTransPopupMenu(model); gtk_widget_show_all(menu); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, event->button, event->time); return TRUE; } /** * 显示文件传输窗口. * @param widset widget set */ void MainWindow::ShowTransWindow(GData **widset) { GtkWidget *widget; guint timerid; widget = GTK_WIDGET(g_datalist_get_data(widset, "trans-window-widget")); gtk_widget_show(widget); gtk_window_present(GTK_WINDOW(widget)); widget = GTK_WIDGET(g_datalist_get_data(widset, "trans-treeview-widget")); timerid = gdk_threads_add_timeout(200, GSourceFunc(UpdateTransUI), widget); g_object_set_data(G_OBJECT(widget), "update-timer-id", GUINT_TO_POINTER(timerid)); } /** * 隐藏文件传输窗口. * @param widset widget set */ void MainWindow::HideTransWindow(GData **widset) { GtkWidget *widget; guint timerid; widget = GTK_WIDGET(g_datalist_get_data(widset, "trans-window-widget")); gtk_widget_hide(widget); widget = GTK_WIDGET(g_datalist_get_data(widset, "trans-treeview-widget")); timerid = GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(widget), "update-timer-id")); g_source_remove(timerid); } /** * 清理文件传输任务. * @param widset widget set */ void MainWindow::ClearTransWindow(GData **widset) { GtkWidget *treeview; GtkTreeModel *model; /* 考察是否需要清理UI */ treeview = GTK_WIDGET(g_datalist_get_data(widset, "trans-treeview-widget")); model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); ClearTransTask(model); /* 重新调整UI */ gtk_tree_view_columns_autosize(GTK_TREE_VIEW(treeview)); } /** * 终止单个传输任务. * @param model trans-model */ void MainWindow::TerminateTransTask(GtkTreeModel *model) { GtkTreePath *path; GtkTreeIter iter; TransAbstract *trans; if (!(path = (GtkTreePath *)(g_object_get_data(G_OBJECT(model), "selected-path")))) return; gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(model, &iter, 12, &trans, -1); if (trans) trans->TerminateTrans(); } /** * 打开接收的文件. * @param model trans-model */ void MainWindow::OpenThisFile(GtkTreeModel *model) { GtkTreePath *path; GtkTreeIter iter; gchar *filename; if (!(path = (GtkTreePath *)(g_object_get_data(G_OBJECT(model), "selected-path")))) return; gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(model, &iter, 12, &filename, -1); if (filename){ if( !g_file_test(filename,G_FILE_TEST_EXISTS)){ GtkWidget *dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("The file you want to open not exist!")); gtk_window_set_title(GTK_WINDOW(dialog), "Iptux Error"); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); return; } iptux_open_url(filename); } } /** * 打开接收文件所在文件夹. * @param model trans-model */ void MainWindow::OpenContainingFolder(GtkTreeModel *model) { GtkTreePath *path; GtkTreeIter iter; gchar *filename,*filepath,*name; if (!(path = (GtkTreePath *)(g_object_get_data(G_OBJECT(model), "selected-path")))) return; gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(model, &iter, 12, &filename, -1); if (filename) { name = ipmsg_get_filename_me(filename,&filepath); if( !g_file_test(filepath,G_FILE_TEST_EXISTS)){ GtkWidget *dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("The path you want to open not exist!")); gtk_window_set_title(GTK_WINDOW(dialog), "Iptux Error"); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); return; } iptux_open_url(filepath); g_free(name); g_free(filepath); } } /** * 终止所有传输任务. * @param model trans-model */ void MainWindow::TerminateAllTransTask(GtkTreeModel *model) { GtkTreeIter iter; TransAbstract *trans; if (!gtk_tree_model_get_iter_first(model, &iter)) return; do { gtk_tree_model_get(model, &iter, 12, &trans, -1); if (trans) trans->TerminateTrans(); } while (gtk_tree_model_iter_next(model, &iter)); } /** * 清理文件传输任务. * @param model trans-model */ void MainWindow::ClearTransTask(GtkTreeModel *model) { GtkTreeIter iter; gpointer data; if (!gtk_tree_model_get_iter_first(model, &iter)) return; do { mark: gtk_tree_model_get(model, &iter, 12, &data, -1); if (!data) { if (gtk_list_store_remove(GTK_LIST_STORE(model), &iter)) goto mark; break; } } while (gtk_tree_model_iter_next(model, &iter)); } /** * 更新好友树. * @param mwin 主窗口类 */ void MainWindow::UpdatePalTree(MainWindow *mwin) { pthread_t pid; pthread_mutex_lock(cthrd.GetMutex()); mwin->ClearAllItemFromPaltree(); cthrd.ClearAllPalFromList(); pthread_mutex_unlock(cthrd.GetMutex()); pthread_create(&pid, NULL, ThreadFunc(CoreThread::SendNotifyToAll), &cthrd); pthread_detach(pid); } /** * 请求此好友的共享文件. * @param grpinf 好友群组信息 */ void MainWindow::AskSharedFiles(GroupInfo *grpinf) { Command cmd; cmd.SendAskShared(cthrd.UdpSockQuote(), (PalInfo *)grpinf->member->data, 0, NULL); } /** * 删除好友项. * @param grpinf 好友群组信息 */ void MainWindow::DeletePalItem(GroupInfo *grpinf) { PalInfo *pal; /* 从UI中移除 */ if (mwin.PaltreeContainItem(grpinf->grpid)) mwin.DelItemFromPaltree(grpinf->grpid); pthread_mutex_lock(cthrd.GetMutex()); /* 从数据中心点移除 */ if ( (pal = cthrd.GetPalFromList(grpinf->grpid))) { cthrd.DelPalFromList(grpinf->grpid); FLAG_CLR(pal->flags, 1); } /* 加入黑名单 */ if (!cthrd.BlacklistContainItem(grpinf->grpid)) cthrd.AttachItemToBlacklist(grpinf->grpid); pthread_mutex_unlock(cthrd.GetMutex()); } /** * 好友树(paltree)信息提示查询请求. * @param treeview the object which received the signal * @param x the x coordinate of the cursor position * @param y the y coordinate of the cursor position * @param key TRUE if the tooltip was trigged using the keyboard * @param tooltip a GtkTooltip * @return Gtk+库所需 */ gboolean MainWindow::PaltreeQueryTooltip(GtkWidget *treeview, gint x, gint y, gboolean key, GtkTooltip *tooltip) { GdkColor color = {0xff, 0xffff, 0xffff, 0xd6d8}; GtkWidget *textview; GtkTextBuffer *buffer; GtkTreePath *path; GtkTreeModel *model; GtkTreeIter iter; gint bx, by; GroupInfo *grpinf; gtk_tree_view_convert_widget_to_bin_window_coords(GTK_TREE_VIEW(treeview), x, y, &bx, &by); if (key || !gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(treeview), bx, by, &path, NULL, NULL, NULL)) return FALSE; model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); gtk_tree_model_get_iter(model, &iter, path); gtk_tree_path_free(path); gtk_tree_model_get(model, &iter, 6, &grpinf, -1); if (grpinf->type != GROUP_BELONG_TYPE_REGULAR) return FALSE; buffer = gtk_text_buffer_new(progdt.table); FillPalInfoToBuffer(buffer, (PalInfo *)grpinf->member->data); textview = gtk_text_view_new_with_buffer(buffer); gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(textview), FALSE); gtk_text_view_set_editable(GTK_TEXT_VIEW(textview), FALSE); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(textview), GTK_WRAP_NONE); gtk_widget_modify_base(textview, GTK_STATE_NORMAL, &color); gtk_tooltip_set_custom(tooltip, textview); g_object_unref(buffer); return TRUE; } /** * 好友树(paltree)项被激活. * @param treeview the object on which the signal is emitted * @param path the GtkTreePath for the activated row * @param column the GtkTreeViewColumn in which the activation occurred */ void MainWindow::PaltreeItemActivated(GtkWidget *treeview, GtkTreePath *path, GtkTreeViewColumn *column) { GtkTreeModel *model; GtkTreeIter iter; GroupInfo *grpinf; /* 获取项关联的群组数据 */ model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(model, &iter, 6, &grpinf, -1); /* 检查是否需要新建对话框 */ if (grpinf->dialog) { gtk_window_present(GTK_WINDOW(grpinf->dialog)); return; } /* 根据需求建立对应的对话框 */ switch (grpinf->type) { case GROUP_BELONG_TYPE_REGULAR: DialogPeer::PeerDialogEntry(grpinf); break; case GROUP_BELONG_TYPE_SEGMENT: case GROUP_BELONG_TYPE_GROUP: case GROUP_BELONG_TYPE_BROADCAST: DialogGroup::GroupDialogEntry(grpinf); default: break; } } /** * 好友树(paltree)弹出操作菜单. * @param treeview tree-view * @param event event * @return Gtk+库所需 */ gboolean MainWindow::PaltreePopupMenu(GtkWidget *treeview, GdkEventButton *event) { GtkWidget *menu; GtkTreeModel *model; GtkTreePath *path; GtkTreeIter iter; GroupInfo *grpinf; /* 检查事件是否可用 */ if (event->button != 3 || !gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(treeview), GINT(event->x), GINT(event->y), &path, NULL, NULL, NULL)) return FALSE; /* 获取好友群组信息数据 */ model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); gtk_tree_model_get_iter(model, &iter, path); gtk_tree_path_free(path); gtk_tree_model_get(model, &iter, 6, &grpinf, -1); /* 弹出菜单 */ menu = CreatePaltreePopupMenu(grpinf); gtk_widget_show_all(menu); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, event->button, event->time); return TRUE; } /** * 展开或隐藏某行. * @param treeview text-view * @param event event * @return Gtk+库所需 */ gboolean MainWindow::PaltreeChangeStatus(GtkWidget *treeview, GdkEventButton *event) { GtkTreeModel *model; GtkCellRenderer *cell; GtkTreeViewColumn *column; GtkTreePath *path; GtkTreeIter iter; gint cellx, startpos, width; GroupInfo *grpinf; /* 检查事件的合法性 */ if (event->button != 1 || !gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(treeview), GINT(event->x), GINT(event->y), &path, &column, &cellx, NULL)) return FALSE; /* 检查此行是否可展开 */ model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(model, &iter, 6, &grpinf, -1); if (grpinf->type == GROUP_BELONG_TYPE_REGULAR) { gtk_tree_path_free(path); return FALSE; } /* 检查事件所发生的位置是否正确 */ cell = GTK_CELL_RENDERER(g_object_get_data(G_OBJECT(column), "expander-cell")); gtk_tree_view_column_cell_get_position(column, cell, &startpos, &width); if ((cellx < startpos) || (cellx > startpos + width)) { gtk_tree_path_free(path); return FALSE; } /* 展开或隐藏行 */ if (gtk_tree_view_row_expanded(GTK_TREE_VIEW(treeview), path)) gtk_tree_view_collapse_row(GTK_TREE_VIEW(treeview), path); else gtk_tree_view_expand_row(GTK_TREE_VIEW(treeview), path, FALSE); gtk_tree_path_free(path); return TRUE; } /** * 好友树(paltree)拖拽事件响应处理函数. * @param treeview tree-view * @param context the drag context * @param x where the drop happened * @param y where the drop happened * @param data the received data * @param info the info that has been registered with the target in the GtkTargetList * @param time the timestamp at which the data was received */ void MainWindow::PaltreeDragDataReceived(GtkWidget *treeview, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, guint info, guint time) { GtkTreeModel *model; GtkTreePath *path; GtkTreeIter iter; gint bx, by; GroupInfo *grpinf; SessionAbstract *session; GSList *list; /* 事件是否可用 */ gtk_tree_view_convert_widget_to_bin_window_coords(GTK_TREE_VIEW(treeview), x, y, &bx, &by); if (!gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(treeview), bx, by, &path, NULL, NULL, NULL)) return; /* 获取好友群组信息数据 */ model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); gtk_tree_model_get_iter(model, &iter, path); gtk_tree_path_free(path); gtk_tree_model_get(model, &iter, 6, &grpinf, -1); /* 如果好友群组对话框尚未创建,则先创建对话框 */ if (!(grpinf->dialog)) { switch (grpinf->type) { case GROUP_BELONG_TYPE_REGULAR: DialogPeer::PeerDialogEntry(grpinf); break; case GROUP_BELONG_TYPE_SEGMENT: case GROUP_BELONG_TYPE_GROUP: case GROUP_BELONG_TYPE_BROADCAST: DialogGroup::GroupDialogEntry(grpinf); default: break; } } else gtk_window_present(GTK_WINDOW(grpinf->dialog)); /* 获取会话对象,并将数据添加到会话对象 */ session = (SessionAbstract *)g_object_get_data(G_OBJECT(grpinf->dialog), "session-class"); list = selection_data_get_path(data); //获取所有文件 session->AttachEnclosure(list); g_slist_foreach(list, GFunc(g_free), NULL); g_slist_free(list); // session->ShowEnclosure(); } /** * 好友树(paltree)按昵称排序的比较函数. * @param model paltree-model * @param a A GtkTreeIter in model * @param b Another GtkTreeIter in model * @return 比较值 */ gint MainWindow::PaltreeCompareByNameFunc(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b) { GroupInfo *agrpinf, *bgrpinf; gint result; gtk_tree_model_get(model, a, 6, &agrpinf, -1); gtk_tree_model_get(model, b, 6, &bgrpinf, -1); result = strcmp(agrpinf->name, bgrpinf->name); return result; } /** * 好友树(paltree)按IP排序的比较函数. * @param model paltree-model * @param a A GtkTreeIter in model * @param b Another GtkTreeIter in model * @return 比较值 */ gint MainWindow::PaltreeCompareByIPFunc(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b) { GroupInfo *agrpinf, *bgrpinf; gint result; gtk_tree_model_get(model, a, 6, &agrpinf, -1); gtk_tree_model_get(model, b, 6, &bgrpinf, -1); if (agrpinf->type == GROUP_BELONG_TYPE_REGULAR && bgrpinf->type == GROUP_BELONG_TYPE_REGULAR) result = ntohl(agrpinf->grpid) - ntohl(bgrpinf->grpid); else result = 0; return result; } /** * 设置好友树(paltree)的比较函数. * @param menuitem radio-menu-item * @param mdlset model set */ void MainWindow::SetPaltreeSortFunc(GtkWidget *menuitem, GData **mdlset) { GtkTreeIterCompareFunc func; GtkTreeModel *model; if (!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem))) return; func = (GtkTreeIterCompareFunc)(g_object_get_data(G_OBJECT(menuitem), "compare-func")); model = GTK_TREE_MODEL(g_datalist_get_data(mdlset, "regular-paltree-model")); gtk_tree_sortable_set_default_sort_func(GTK_TREE_SORTABLE(model), func, NULL, NULL); model = GTK_TREE_MODEL(g_datalist_get_data(mdlset, "segment-paltree-model")); gtk_tree_sortable_set_default_sort_func(GTK_TREE_SORTABLE(model), func, NULL, NULL); model = GTK_TREE_MODEL(g_datalist_get_data(mdlset, "group-paltree-model")); gtk_tree_sortable_set_default_sort_func(GTK_TREE_SORTABLE(model), func, NULL, NULL); model = GTK_TREE_MODEL(g_datalist_get_data(mdlset, "broadcast-paltree-model")); gtk_tree_sortable_set_default_sort_func(GTK_TREE_SORTABLE(model), func, NULL, NULL); } /** * 设置好友树(paltree)的排序方式. * @param menuitem radio-menu-item * @param mdlset model set */ void MainWindow::SetPaltreeSortType(GtkWidget *menuitem, GData **mdlset) { GtkSortType type; GtkTreeModel *model; if (!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem))) return; type = (GtkSortType)GPOINTER_TO_INT(g_object_get_data(G_OBJECT(menuitem), "sort-type")); model = GTK_TREE_MODEL(g_datalist_get_data(mdlset, "regular-paltree-model")); gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(model), GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, type); model = GTK_TREE_MODEL(g_datalist_get_data(mdlset, "segment-paltree-model")); gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(model), GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, type); model = GTK_TREE_MODEL(g_datalist_get_data(mdlset, "group-paltree-model")); gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(model), GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, type); model = GTK_TREE_MODEL(g_datalist_get_data(mdlset, "broadcast-paltree-model")); gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(model), GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, type); } /** * 显示好友清单区域. * @param widset widget set */ void MainWindow::ShowPallistArea(GData **widset) { GtkWidget *widget; widget = GTK_WIDGET(g_datalist_get_data(widset, "pallist-box-widget")); gtk_widget_show(widget); widget = GTK_WIDGET(g_datalist_get_data(widset, "pallist-entry-widget")); gtk_widget_grab_focus(widget); PallistEntryChanged(widget, widset); } /** * 隐藏好友清单区域. * @param widset widget set */ void MainWindow::HidePallistArea(GData **widset) { GtkWidget *widget; GtkTreeModel *model; widget = GTK_WIDGET(g_datalist_get_data(widset, "pallist-box-widget")); gtk_widget_hide(widget); widget = GTK_WIDGET(g_datalist_get_data(widset, "pallist-treeview-widget")); model = gtk_tree_view_get_model(GTK_TREE_VIEW(widget)); gtk_list_store_clear(GTK_LIST_STORE(model)); widget = GTK_WIDGET(g_datalist_get_data(widset, "pallist-entry-widget")); gtk_editable_delete_text(GTK_EDITABLE(widget), 0, -1); } /** * 清空好友清单搜索输入框. * @param entry entry * @param event event * @return Gtk+库所需 */ gboolean MainWindow::ClearPallistEntry(GtkWidget *entry, GdkEventKey *event) { if (event->keyval != GDK_Escape) return FALSE; gtk_editable_delete_text(GTK_EDITABLE(entry), 0, -1); return TRUE; } /** * 好友清单搜索输入框内容变更响应处理函数. * @param entry entry * @param widset widget set */ void MainWindow::PallistEntryChanged(GtkWidget *entry,GData **widset) { GtkIconTheme *theme; GdkPixbuf *pixbuf; GtkWidget *treeview; GtkTreeModel *model; GtkTreeIter iter; char ipstr[INET_ADDRSTRLEN], *file; const gchar *text; GSList *tlist; PalInfo *pal; /* 获取默认主题 */ theme = gtk_icon_theme_get_default(); /* 获取搜索内容 */ text = gtk_entry_get_text(GTK_ENTRY(entry)); /* 获取好友清单,并清空 */ treeview = GTK_WIDGET(g_datalist_get_data(widset, "pallist-treeview-widget")); model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); gtk_list_store_clear(GTK_LIST_STORE(model)); /* 将符合条件的好友加入好友清单 */ tlist = cthrd.GetPalList(); while (tlist) { pal = (PalInfo *)tlist->data; inet_ntop(AF_INET, &pal->ipv4, ipstr, INET_ADDRSTRLEN); /* Search friends case ingore is better. */ if (*text == '\0' || strcasestr(pal->name, text) || (pal->group && strcasestr(pal->group, text)) || strcasestr(ipstr, text) || strcasestr(pal->user, text) || strcasestr(pal->host, text)) { file = iptux_erase_filename_suffix(pal->iconfile); pixbuf = gtk_icon_theme_load_icon(theme, file, MAX_ICONSIZE, GtkIconLookupFlags(0), NULL); g_free(file); gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, pixbuf, 1, pal->name, 2, pal->group, 3, ipstr, 4, pal->user, 5, pal->host, 6, pal, -1); if (pixbuf) g_object_unref(pixbuf); } tlist = g_slist_next(tlist); } /* 重新调整好友清单UI */ gtk_tree_view_columns_autosize(GTK_TREE_VIEW(treeview)); } /** * 好友清单(pallist)项被激活. * @param treeview the object on which the signal is emitted * @param path the GtkTreePath for the activated row * @param column the GtkTreeViewColumn in which the activation occurred */ void MainWindow::PallistItemActivated(GtkWidget *treeview, GtkTreePath *path, GtkTreeViewColumn *column) { GtkTreeModel *model; GtkTreeIter iter; GroupInfo *grpinf; PalInfo *pal; model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(model, &iter, 6, &pal, -1); if ( (grpinf = cthrd.GetPalRegularItem(pal))) { if (!(grpinf->dialog)) DialogPeer::PeerDialogEntry(grpinf); else gtk_window_present(GTK_WINDOW(grpinf->dialog)); // if(pal->filelist) // ((DialogPeer *)(grpinf->dialog))->FillFileToReceiveModel(); } } /** * 好友清单(pallist)拖拽事件响应处理函数. * @param treeview tree-view * @param context the drag context * @param x where the drop happened * @param y where the drop happened * @param data the received data * @param info the info that has been registered with the target in the GtkTargetList * @param time the timestamp at which the data was received */ void MainWindow::PallistDragDataReceived(GtkWidget *treeview, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, guint info, guint time) { GtkTreeModel *model; GtkTreePath *path; GtkTreeIter iter; gint bx, by; GroupInfo *grpinf; PalInfo *pal; SessionAbstract *session; GSList *list; /* 事件是否可用 */ gtk_tree_view_convert_widget_to_bin_window_coords(GTK_TREE_VIEW(treeview), x, y, &bx, &by); if (!gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(treeview), bx, by, &path, NULL, NULL, NULL)) return; /* 获取好友群组信息数据 */ model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); gtk_tree_model_get_iter(model, &iter, path); gtk_tree_path_free(path); gtk_tree_model_get(model, &iter, 6, &pal, -1); if (!(grpinf = cthrd.GetPalRegularItem(pal))) return; /* 如果好友群组对话框尚未创建,则先创建对话框 */ if (!(grpinf->dialog)) DialogPeer::PeerDialogEntry(grpinf); else gtk_window_present(GTK_WINDOW(grpinf->dialog)); /* 获取会话对象,并将数据添加到会话对象 */ session = (SessionAbstract *)g_object_get_data(G_OBJECT(grpinf->dialog), "session-class"); list = selection_data_get_path(data); //获取所有文件 session->AttachEnclosure(list); g_slist_foreach(list, GFunc(g_free), NULL); g_slist_free(list); // session->ShowEnclosure(); } /** * 主窗口位置&大小改变的响应处理函数. * @param window 主窗口 * @param event the GdkEventConfigure which triggered this signal * @param dtset data set * @return Gtk+库所需 */ gboolean MainWindow::MWinConfigureEvent(GtkWidget *window, GdkEventConfigure *event, GData **dtset) { g_datalist_set_data(dtset, "main-window-width", GINT_TO_POINTER(event->width)); g_datalist_set_data(dtset, "main-window-height", GINT_TO_POINTER(event->height)); return FALSE; } /** * 文件传输窗口位置&大小改变的响应处理函数. * @param window 文件传输窗口 * @param event the GdkEventConfigure which triggered this signal * @param dtset data set * @return Gtk+库所需 */ gboolean MainWindow::TWinConfigureEvent(GtkWidget *window, GdkEventConfigure *event, GData **dtset) { g_datalist_set_data(dtset, "trans-window-width", GINT_TO_POINTER(event->width)); g_datalist_set_data(dtset, "trans-window-height", GINT_TO_POINTER(event->height)); return FALSE; } /** * 分割面板的分割位置改变的响应处理函数. * @param paned paned * @param pspec he GParamSpec of the property which changed * @param dtset data set */ void MainWindow::PanedDivideChanged(GtkWidget *paned, GParamSpec *pspec, GData **dtset) { const gchar *identify; gint position; identify = (const gchar *)g_object_get_data(G_OBJECT(paned), "position-name"); position = gtk_paned_get_position(GTK_PANED(paned)); g_datalist_set_data(dtset, identify, GINT_TO_POINTER(position)); } iptux-0.6.3/src/MainWindow.h000077500000000000000000000150101257720006400157100ustar00rootroot00000000000000// // C++ Interface: MainWindow // // Description: // 创建程序主窗口 // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef MAINWINDOW_H #define MAINWINDOW_H #include "mess.h" /** * @note 鉴于本类成员函数所访问的(CoreThread)类成员链表都具有只增不减的特性, * 所以无须加锁访问,若有例外,请于注释中说明,否则应当bug处理.\n * 若此特性不可被如此利用,请报告bug. */ class MainWindow { public: MainWindow(); ~MainWindow(); void CreateWindow(); void AlterWindowMode(); GtkWidget *ObtainWindow(); bool PaltreeContainItem(in_addr_t ipv4); void UpdateItemToPaltree(in_addr_t ipv4); void AttachItemToPaltree(in_addr_t ipv4); void DelItemFromPaltree(in_addr_t ipv4); void ClearAllItemFromPaltree(); void MakeItemBlinking(GroupInfo *grpinf, bool blinking); void OpenTransWindow(); void UpdateItemToTransTree(GData **para); bool TransmissionActive(); private: void InitSublayer(); void ClearSublayer(); void ReadUILayout(); void WriteUILayout(); GtkWidget *CreateMainWindow(); GtkWidget *CreateTransWindow(); GtkWidget *CreateAllArea(); GtkWidget *CreateTransArea(); GtkWidget *CreateMenuBar(); GtkWidget *CreateToolBar(); GtkWidget *CreatePaltreeArea(); GtkWidget *CreatePallistArea(); GtkWidget *CreateFileMenu(); GtkWidget *CreateToolMenu(); GtkWidget *CreateHelpMenu(); GtkTreeModel *CreatePaltreeModel(); GtkTreeModel *CreatePallistModel(); GtkTreeModel *CreateTransModel(); GtkWidget *CreatePaltreeTree(GtkTreeModel *model); GtkWidget *CreatePallistTree(GtkTreeModel *model); GtkWidget *CreateTransTree(GtkTreeModel *model); bool GroupGetPrevPaltreeItem(GtkTreeModel *model, GtkTreeIter *iter, GroupInfo *grpinf); bool GroupGetPaltreeItem(GtkTreeModel *model, GtkTreeIter *iter, GroupInfo *grpinf); bool GroupGetPaltreeItemWithParent(GtkTreeModel *model, GtkTreeIter *iter, GroupInfo *grpinf); void FillGroupInfoToPaltree(GtkTreeModel *model, GtkTreeIter *iter, GroupInfo *grpinf); void UpdateGroupInfoToPaltree(GtkTreeModel *model, GtkTreeIter *iter, GroupInfo *grpinf); void BlinkGroupItemToPaltree(GtkTreeModel *model, GtkTreeIter *iter, bool blinking); GData *widset; //窗体集 GData *mdlset; //数据model集 GData *dtset; //通用数据集 GList *tmdllist; //model链表,用于构建model循环结构 GtkAccelGroup *accel; //快捷键集组 guint timerid; //UI更新定时器ID private: static GtkWidget *CreateTransPopupMenu(GtkTreeModel *model); static GtkWidget *CreatePaltreePopupMenu(GroupInfo *grpinf); static void FillPalInfoToBuffer(GtkTextBuffer *buffer, PalInfo *pal); //回调处理部分 private: static gboolean UpdateUI(MainWindow *mwin); static void GoPrevTreeModel(MainWindow *mwin); static void GoNextTreeModel(MainWindow *mwin); static gboolean UpdateTransUI(GtkWidget *treeview); static gboolean TransPopupMenu(GtkWidget *treeview, GdkEventButton *event); static void ShowTransWindow(GData **widset); static void HideTransWindow(GData **widset); static void ClearTransWindow(GData **widset); static void TerminateTransTask(GtkTreeModel *model); static void TerminateAllTransTask(GtkTreeModel *model); static void ClearTransTask(GtkTreeModel *model); static void OpenContainingFolder(GtkTreeModel *model); static void OpenThisFile(GtkTreeModel *model); static void UpdatePalTree(MainWindow *mwin); static void AskSharedFiles(GroupInfo *grpinf); static void DeletePalItem(GroupInfo *grpinf); static gboolean PaltreeQueryTooltip(GtkWidget *treeview, gint x, gint y, gboolean key, GtkTooltip *tooltip); static void PaltreeItemActivated(GtkWidget *treeview, GtkTreePath *path, GtkTreeViewColumn *column); static gboolean PaltreePopupMenu(GtkWidget *treeview, GdkEventButton *event); static gboolean PaltreeChangeStatus(GtkWidget *treeview, GdkEventButton *event); static void PaltreeDragDataReceived(GtkWidget *treeview, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, guint info, guint time); static gint PaltreeCompareByNameFunc(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b); static gint PaltreeCompareByIPFunc(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b); static void SetPaltreeSortFunc(GtkWidget *menuitem, GData **mdlset); static void SetPaltreeSortType(GtkWidget *menuitem, GData **mdlset); static void ShowPallistArea(GData **widset); static void HidePallistArea(GData **widset); static gboolean ClearPallistEntry(GtkWidget *entry, GdkEventKey *event); static void PallistEntryChanged(GtkWidget *entry,GData **widset); static void PallistItemActivated(GtkWidget *treeview, GtkTreePath *path, GtkTreeViewColumn *column); static void PallistDragDataReceived(GtkWidget *treeview, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, guint info, guint time); static gboolean MWinConfigureEvent(GtkWidget *window, GdkEventConfigure *event, GData **dtset); static gboolean TWinConfigureEvent(GtkWidget *window, GdkEventConfigure *event, GData **dtset); static void PanedDivideChanged(GtkWidget *paned, GParamSpec *pspec, GData **dtset); }; #endif iptux-0.6.3/src/Makefile.am000066400000000000000000000021151257720006400155160ustar00rootroot00000000000000# main program bin_PROGRAMS = iptux iptux_SOURCES = AnalogFS.cpp Command.cpp CoreThread.cpp DataSettings.cpp \ DetectPal.cpp DialogBase.cpp DialogGroup.cpp DialogPeer.cpp HelpDialog.cpp LogSystem.cpp \ MainWindow.cpp ProgramData.cpp RecvFile.cpp RecvFileData.cpp RevisePal.cpp \ SendFile.cpp SendFileData.cpp ShareFile.cpp SoundSystem.cpp StatusIcon.cpp \ TcpData.cpp UdpData.cpp callback.cpp dialog.cpp iptux.cpp mess.cpp output.cpp \ support.cpp utils.cpp wrapper.cpp AM_CXXFLAGS = -Wall # set the include path found by configure AM_CPPFLAGS = $(all_includes) @PACKAGE_CFLAGS@ # the library search path. iptux_LDADD = $(INTLLIBS) @PACKAGE_LIBS@ LIBS = $(all_libraries) noinst_HEADERS = AnalogFS.h Command.h CoreThread.h DataSettings.h DetectPal.h DialogBase.h \ DialogGroup.h DialogPeer.h HelpDialog.h LogSystem.h MainWindow.h ProgramData.h \ RecvFile.h RecvFileData.h RevisePal.h SendFile.h SendFileData.h ShareFile.h \ SoundSystem.h StatusIcon.h TcpData.h UdpData.h callback.h deplib.h dialog.h \ ipmsg.h mess.h net.h output.h support.h sys.h utils.h wrapper.h # SUBDIRS = uninstall iptux-0.6.3/src/Makefile.in000066400000000000000000000532331257720006400155360ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = iptux$(EXEEXT) subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_iptux_OBJECTS = AnalogFS.$(OBJEXT) Command.$(OBJEXT) \ CoreThread.$(OBJEXT) DataSettings.$(OBJEXT) \ DetectPal.$(OBJEXT) DialogBase.$(OBJEXT) DialogGroup.$(OBJEXT) \ DialogPeer.$(OBJEXT) HelpDialog.$(OBJEXT) LogSystem.$(OBJEXT) \ MainWindow.$(OBJEXT) ProgramData.$(OBJEXT) RecvFile.$(OBJEXT) \ RecvFileData.$(OBJEXT) RevisePal.$(OBJEXT) SendFile.$(OBJEXT) \ SendFileData.$(OBJEXT) ShareFile.$(OBJEXT) \ SoundSystem.$(OBJEXT) StatusIcon.$(OBJEXT) TcpData.$(OBJEXT) \ UdpData.$(OBJEXT) callback.$(OBJEXT) dialog.$(OBJEXT) \ iptux.$(OBJEXT) mess.$(OBJEXT) output.$(OBJEXT) \ support.$(OBJEXT) utils.$(OBJEXT) wrapper.$(OBJEXT) iptux_OBJECTS = $(am_iptux_OBJECTS) am__DEPENDENCIES_1 = iptux_DEPENDENCIES = $(am__DEPENDENCIES_1) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(iptux_SOURCES) DIST_SOURCES = $(iptux_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_CFLAGS = @GST_CFLAGS@ GST_LIBS = @GST_LIBS@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = $(all_libraries) LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ desktopdir = @desktopdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logodir = @logodir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pixmapsdir = @pixmapsdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sounddir = @sounddir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ iptux_SOURCES = AnalogFS.cpp Command.cpp CoreThread.cpp DataSettings.cpp \ DetectPal.cpp DialogBase.cpp DialogGroup.cpp DialogPeer.cpp HelpDialog.cpp LogSystem.cpp \ MainWindow.cpp ProgramData.cpp RecvFile.cpp RecvFileData.cpp RevisePal.cpp \ SendFile.cpp SendFileData.cpp ShareFile.cpp SoundSystem.cpp StatusIcon.cpp \ TcpData.cpp UdpData.cpp callback.cpp dialog.cpp iptux.cpp mess.cpp output.cpp \ support.cpp utils.cpp wrapper.cpp AM_CXXFLAGS = -Wall # set the include path found by configure AM_CPPFLAGS = $(all_includes) @PACKAGE_CFLAGS@ # the library search path. iptux_LDADD = $(INTLLIBS) @PACKAGE_LIBS@ noinst_HEADERS = AnalogFS.h Command.h CoreThread.h DataSettings.h DetectPal.h DialogBase.h \ DialogGroup.h DialogPeer.h HelpDialog.h LogSystem.h MainWindow.h ProgramData.h \ RecvFile.h RecvFileData.h RevisePal.h SendFile.h SendFileData.h ShareFile.h \ SoundSystem.h StatusIcon.h TcpData.h UdpData.h callback.h deplib.h dialog.h \ ipmsg.h mess.h net.h output.h support.h sys.h utils.h wrapper.h all: all-am .SUFFIXES: .SUFFIXES: .cpp .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) iptux$(EXEEXT): $(iptux_OBJECTS) $(iptux_DEPENDENCIES) $(EXTRA_iptux_DEPENDENCIES) @rm -f iptux$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(iptux_OBJECTS) $(iptux_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AnalogFS.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Command.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CoreThread.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DataSettings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DetectPal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DialogBase.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DialogGroup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DialogPeer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HelpDialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LogSystem.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MainWindow.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ProgramData.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RecvFile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RecvFileData.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RevisePal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SendFile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SendFileData.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ShareFile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SoundSystem.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/StatusIcon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TcpData.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UdpData.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/callback.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iptux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mess.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/support.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wrapper.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # SUBDIRS = uninstall # 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: iptux-0.6.3/src/ProgramData.cpp000077500000000000000000000530141257720006400163760ustar00rootroot00000000000000// // C++ Implementation: ProgramData // // Description: // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #include "ProgramData.h" #include "CoreThread.h" #include "utils.h" /** * 类构造函数. */ ProgramData::ProgramData():nickname(NULL), mygroup(NULL), myicon(NULL), path(NULL), sign(NULL), codeset(NULL), encode(NULL), palicon(NULL), font(NULL), flags(0), transtip(NULL), msgtip(NULL), volume(1.0), sndfgs(~0), netseg(NULL), urlregex(NULL), xcursor(NULL), lcursor(NULL), table(NULL), cnxnid(0) { gettimeofday(×tamp, NULL); pthread_mutex_init(&mutex, NULL); } /** * 类析构函数. */ ProgramData::~ProgramData() { GConfClient *client; g_free(nickname); g_free(mygroup); g_free(myicon); g_free(path); g_free(sign); g_free(codeset); g_free(encode); g_free(palicon); g_free(font); g_free(msgtip); g_free(transtip); for (GSList *tlist = netseg; tlist; tlist = g_slist_next(tlist)) delete (NetSegment *)tlist->data; g_slist_free(netseg); if (urlregex) g_regex_unref(urlregex); if (xcursor) gdk_cursor_unref(xcursor); if (lcursor) gdk_cursor_unref(lcursor); if (table) g_object_unref(table); if (cnxnid > 0) { client = gconf_client_get_default(); gconf_client_notify_remove(client, cnxnid); g_object_unref(client); } pthread_mutex_destroy(&mutex); } /** * 初始化相关类成员数据. */ void ProgramData::InitSublayer() { ReadProgData(); AddGconfNotify(); CheckIconTheme(); CreateRegex(); CreateCursor(); CreateTagTable(); } /** * 写出程序数据. */ void ProgramData::WriteProgData() { GConfClient *client; client = gconf_client_get_default(); gettimeofday(×tamp, NULL); //更新时间戳 gconf_client_set_string(client, GCONF_PATH "/nick_name", nickname, NULL); gconf_client_set_string(client, GCONF_PATH "/belong_group", mygroup, NULL); gconf_client_set_string(client, GCONF_PATH "/my_icon", myicon, NULL); gconf_client_set_string(client, GCONF_PATH "/archive_path", path, NULL); gconf_client_set_string(client, GCONF_PATH "/personal_sign", sign, NULL); gconf_client_set_string(client, GCONF_PATH "/candidacy_encode", codeset, NULL); gconf_client_set_string(client, GCONF_PATH "/preference_encode", encode, NULL); gconf_client_set_string(client, GCONF_PATH "/pal_icon", palicon, NULL); gconf_client_set_string(client, GCONF_PATH "/panel_font", font, NULL); gconf_client_set_bool(client, GCONF_PATH "/open-chat", FLAG_ISSET(flags, 7) ? TRUE : FALSE, NULL); gconf_client_set_bool(client, GCONF_PATH "/hide_startup", FLAG_ISSET(flags, 6) ? TRUE : FALSE, NULL); gconf_client_set_bool(client, GCONF_PATH "/open_transmission", FLAG_ISSET(flags, 5) ? TRUE : FALSE, NULL); gconf_client_set_bool(client, GCONF_PATH "/use_enter_key", FLAG_ISSET(flags, 4) ? TRUE : FALSE, NULL); gconf_client_set_bool(client, GCONF_PATH "/clearup_history", FLAG_ISSET(flags, 3) ? TRUE : FALSE, NULL); gconf_client_set_bool(client, GCONF_PATH "/record_log", FLAG_ISSET(flags, 2) ? TRUE : FALSE, NULL); gconf_client_set_bool(client, GCONF_PATH "/open_blacklist", FLAG_ISSET(flags, 1) ? TRUE : FALSE, NULL); gconf_client_set_bool(client, GCONF_PATH "/proof_shared", FLAG_ISSET(flags, 0) ? TRUE : FALSE, NULL); gconf_client_set_string(client, GCONF_PATH "/trans_tip", transtip, NULL); gconf_client_set_string(client, GCONF_PATH "/msg_tip", msgtip, NULL); gconf_client_set_float(client, GCONF_PATH "/volume_degree", volume, NULL); gconf_client_set_bool(client, GCONF_PATH "/transnd_support", FLAG_ISSET(sndfgs, 2) ? TRUE : FALSE, NULL); gconf_client_set_bool(client, GCONF_PATH "/msgsnd_support", FLAG_ISSET(sndfgs, 1) ? TRUE : FALSE, NULL); gconf_client_set_bool(client, GCONF_PATH "/sound_support", FLAG_ISSET(sndfgs, 0) ? TRUE : FALSE, NULL); WriteNetSegment(client); g_object_unref(client); } /** * 深拷贝一份网段数据. * @return 网段数据 */ GSList *ProgramData::CopyNetSegment() { NetSegment *ns, *pns; GSList *tlist, *nseg; nseg = NULL; tlist = netseg; while (tlist) { pns = (NetSegment *)tlist->data; ns = new NetSegment; nseg = g_slist_append(nseg, ns); ns->startip = g_strdup(pns->startip); ns->endip = g_strdup(pns->endip); ns->description = g_strdup(pns->description); tlist = g_slist_next(tlist); } return nseg; } /** * 查询(ipv4)所在网段的描述串. * @param ipv4 ipv4 * @return 描述串 */ char *ProgramData::FindNetSegDescription(in_addr_t ipv4) { in_addr_t startip, endip; NetSegment *pns; GSList *tlist; char *description; ipv4 = ntohl(ipv4); description = NULL; tlist = netseg; while (tlist) { pns = (NetSegment *)tlist->data; inet_pton(AF_INET, pns->startip, &startip); startip = ntohl(startip); inet_pton(AF_INET, pns->endip, &endip); endip = ntohl(endip); ipv4_order(&startip, &endip); if (ipv4 >= startip && ipv4 <= endip) { description = g_strdup(pns->description); break; } tlist = g_slist_next(tlist); } return description; } /** * 读取程序数据. */ void ProgramData::ReadProgData() { GConfClient *client; GConfValue *value; client = gconf_client_get_default(); if (!(nickname = gconf_client_get_string(client, GCONF_PATH "/nick_name", NULL))) nickname = g_strdup(g_get_user_name()); if (!(mygroup = gconf_client_get_string(client, GCONF_PATH "/belong_group", NULL))) mygroup = g_strdup(""); if (!(myicon = gconf_client_get_string(client, GCONF_PATH "/my_icon", NULL))) myicon = g_strdup("icon-tux.png"); if (!(path = gconf_client_get_string(client, GCONF_PATH "/archive_path", NULL))) path = g_strdup(g_get_home_dir()); if (!(sign = gconf_client_get_string(client, GCONF_PATH "/personal_sign", NULL))) sign = g_strdup(""); if (!(codeset = gconf_client_get_string(client, GCONF_PATH "/candidacy_encode", NULL))) codeset = g_strdup(_("utf-16")); if (!(encode = gconf_client_get_string(client, GCONF_PATH "/preference_encode", NULL))) encode = g_strdup(_("utf-8")); if (!(palicon = gconf_client_get_string(client, GCONF_PATH "/pal_icon", NULL))) palicon = g_strdup("icon-qq.png"); if (!(font = gconf_client_get_string(client, GCONF_PATH "/panel_font", NULL))) font = g_strdup("Sans Serif 10"); if (gconf_client_get_bool(client, GCONF_PATH "/open-chat", NULL)) FLAG_SET(flags, 7); if (gconf_client_get_bool(client, GCONF_PATH "/hide_startup", NULL)) FLAG_SET(flags, 6); if (gconf_client_get_bool(client, GCONF_PATH "/open_transmission", NULL)) FLAG_SET(flags, 5); if (gconf_client_get_bool(client, GCONF_PATH "/use_enter_key", NULL)) FLAG_SET(flags, 4); if (gconf_client_get_bool(client, GCONF_PATH "/clearup_history", NULL)) FLAG_SET(flags, 3); if (gconf_client_get_bool(client, GCONF_PATH "/record_log", NULL)) FLAG_SET(flags, 2); if (gconf_client_get_bool(client, GCONF_PATH "/open_blacklist", NULL)) FLAG_SET(flags, 1); if (gconf_client_get_bool(client, GCONF_PATH "/proof_shared", NULL)) FLAG_SET(flags, 0); if (!(msgtip = gconf_client_get_string(client, GCONF_PATH "/msg_tip", NULL))) msgtip = g_strdup(__SOUND_PATH "/msg.ogg"); if (!(transtip = gconf_client_get_string(client, GCONF_PATH "/trans_tip", NULL))) transtip = g_strdup(__SOUND_PATH "/trans.ogg"); if ( (value = gconf_client_get(client, GCONF_PATH "/volume_degree", NULL))) { volume = gconf_value_get_float(value); gconf_value_free(value); } if ( (value = gconf_client_get(client, GCONF_PATH "/transnd_support", NULL))) { if (!gconf_value_get_bool(value)) FLAG_CLR(sndfgs, 2); gconf_value_free(value); } if ( (value = gconf_client_get(client, GCONF_PATH "/msgsnd_support", NULL))) { if (!gconf_value_get_bool(value)) FLAG_CLR(sndfgs, 1); gconf_value_free(value); } if ( (value = gconf_client_get(client, GCONF_PATH "/sound_support", NULL))) { if (!gconf_value_get_bool(value)) FLAG_CLR(sndfgs, 0); gconf_value_free(value); } ReadNetSegment(client); g_object_unref(client); } /** * 监视程序配置文件信息数据的变更. */ void ProgramData::AddGconfNotify() { GConfClient *client; client = gconf_client_get_default(); gconf_client_add_dir(client, GCONF_PATH, GCONF_CLIENT_PRELOAD_NONE, NULL); cnxnid = gconf_client_notify_add(client, GCONF_PATH, GConfClientNotifyFunc(GconfNotifyFunc), this, NULL, NULL); g_object_unref(client); } /** * 确保头像数据被存放在主题库中. */ void ProgramData::CheckIconTheme() { char pathbuf[MAX_PATHLEN]; GdkPixbuf *pixbuf; snprintf(pathbuf, MAX_PATHLEN, __PIXMAPS_PATH "/icon/%s", myicon); if (access(pathbuf, F_OK) != 0) { snprintf(pathbuf, MAX_PATHLEN, "%s" ICON_PATH "/%s", g_get_user_config_dir(), myicon); if ( (pixbuf = gdk_pixbuf_new_from_file(pathbuf, NULL))) { gtk_icon_theme_add_builtin_icon(myicon, MAX_ICONSIZE, pixbuf); g_object_unref(pixbuf); } } snprintf(pathbuf, MAX_PATHLEN, __PIXMAPS_PATH "/icon/%s", palicon); if (access(pathbuf, F_OK) != 0) { snprintf(pathbuf, MAX_PATHLEN, "%s" ICON_PATH "/%s", g_get_user_config_dir(), palicon); if ( (pixbuf = gdk_pixbuf_new_from_file(pathbuf, NULL))) { gtk_icon_theme_add_builtin_icon(palicon, MAX_ICONSIZE, pixbuf); g_object_unref(pixbuf); } } } /** * 创建识别URL的正则表达式. */ void ProgramData::CreateRegex() { urlregex = g_regex_new(URL_REGEX, GRegexCompileFlags(0), GRegexMatchFlags(0), NULL); } /** * 创建鼠标光标. */ void ProgramData::CreateCursor() { xcursor = gdk_cursor_new(GDK_XTERM); lcursor = gdk_cursor_new(GDK_HAND2); } /** * 创建用于(text-view)的一些通用tag. * @note 给这些tag一个"global"标记,表示这些对象是全局共享的 */ void ProgramData::CreateTagTable() { GtkTextTag *tag; table = gtk_text_tag_table_new(); tag = gtk_text_tag_new("pal-color"); g_object_set(tag, "foreground", "blue", NULL); g_object_set_data(G_OBJECT(tag), "global", GINT_TO_POINTER(TRUE)); gtk_text_tag_table_add(table, tag); g_object_unref(tag); tag = gtk_text_tag_new("me-color"); g_object_set(tag, "foreground", "green", NULL); g_object_set_data(G_OBJECT(tag), "global", GINT_TO_POINTER(TRUE)); gtk_text_tag_table_add(table, tag); g_object_unref(tag); tag = gtk_text_tag_new("error-color"); g_object_set(tag, "foreground", "red", NULL); g_object_set_data(G_OBJECT(tag), "global", GINT_TO_POINTER(TRUE)); gtk_text_tag_table_add(table, tag); g_object_unref(tag); tag = gtk_text_tag_new("sign-words"); g_object_set(tag, "indent", 10, "foreground", "#1005F0", "font", "Sans Italic 8", NULL); g_object_set_data(G_OBJECT(tag), "global", GINT_TO_POINTER(TRUE)); gtk_text_tag_table_add(table, tag); g_object_unref(tag); tag = gtk_text_tag_new("url-link"); g_object_set(tag, "foreground", "blue", "underline", PANGO_UNDERLINE_SINGLE, NULL); g_object_set_data(G_OBJECT(tag), "global", GINT_TO_POINTER(TRUE)); gtk_text_tag_table_add(table, tag); g_object_unref(tag); } /** * 写出网段数据. * @param client GConfClient */ void ProgramData::WriteNetSegment(GConfClient *client) { NetSegment *pns; GSList *list, *tlist; list = NULL; pthread_mutex_lock(&mutex); tlist = netseg; while (tlist) { pns = (NetSegment *)tlist->data; list = g_slist_append(list, pns->startip); list = g_slist_append(list, pns->endip); list = g_slist_append(list, pns->description ? pns->description : (void*)""); tlist = g_slist_next(tlist); } pthread_mutex_unlock(&mutex); gconf_client_set_list(client, GCONF_PATH "/scan_net_segment", GCONF_VALUE_STRING, list, NULL); g_slist_free(list); } /** * 读取网段数据. * @param client GConfClient */ void ProgramData::ReadNetSegment(GConfClient *client) { NetSegment *ns; GSList *list, *tlist; tlist = list = gconf_client_get_list(client, GCONF_PATH "/scan_net_segment", GCONF_VALUE_STRING, NULL); pthread_mutex_lock(&mutex); while (tlist) { ns = new NetSegment; netseg = g_slist_append(netseg, ns); ns->startip = (char *)tlist->data; tlist = g_slist_next(tlist); ns->endip = (char *)tlist->data; tlist = g_slist_next(tlist); ns->description = (char *)tlist->data; tlist = g_slist_next(tlist); } pthread_mutex_unlock(&mutex); g_slist_free(list); } /** * 配置文件信息数据变更的响应处理函数. * 当本程序写出数据时,程序会自动更新时间戳,所以若当前时间与时间戳间隔太短, * 便认为是本程序写出数据导致配置文件信息数据发生了变化,在这种情况下, * 响应函数无需理睬数值的变更.\n * @param client the GConfClient notifying us. * @param cnxnid connection ID from gconf_client_notify_add(). * @param entry a GConfEntry. * @param progdt 程序数据类 */ void ProgramData::GconfNotifyFunc(GConfClient *client, guint cnxnid, GConfEntry *entry, ProgramData *progdt) { struct timeval stamp; const char *str; bool update; /* 如果没有值则直接跳出 */ if (!entry->value) return; /* 如果间隔太短则直接跳出 */ gettimeofday(&stamp, NULL); if (difftimeval(stamp, progdt->timestamp) < 1.0) return; /* 匹配键值并修正 */ update = false; //预设更新标记为假 if (strcmp(entry->key, GCONF_PATH "/nick_name") == 0) { if ( (str = gconf_value_get_string(entry->value))) { g_free(progdt->nickname); progdt->nickname = g_strdup(str); update = true; } } else if (strcmp(entry->key, GCONF_PATH "/belong_group") == 0) { if ( (str = gconf_value_get_string(entry->value))) { g_free(progdt->mygroup); progdt->mygroup = g_strdup(str); update = true; } } else if (strcmp(entry->key, GCONF_PATH "/my_icon") == 0) { if ( (str = gconf_value_get_string(entry->value))) { g_free(progdt->myicon); progdt->myicon = g_strdup(str); update = true; } } else if (strcmp(entry->key, GCONF_PATH "/archive_path") == 0) { if ( (str = gconf_value_get_string(entry->value))) { g_free(progdt->path); progdt->path = g_strdup(str); } } else if (strcmp(entry->key, GCONF_PATH "/personal_sign") == 0) { if ( (str = gconf_value_get_string(entry->value))) { g_free(progdt->sign); progdt->sign = g_strdup(str); update = true; } } else if (strcmp(entry->key, GCONF_PATH "/candidacy_encode") == 0) { if ( (str = gconf_value_get_string(entry->value))) { g_free(progdt->codeset); progdt->codeset = g_strdup(str); } } else if (strcmp(entry->key, GCONF_PATH "/preference_encode") == 0) { if ( (str = gconf_value_get_string(entry->value))) { g_free(progdt->encode); progdt->encode = g_strdup(str); } } else if (strcmp(entry->key, GCONF_PATH "/pal_icon") == 0) { if ( (str = gconf_value_get_string(entry->value))) { g_free(progdt->palicon); progdt->palicon = g_strdup(str); } } else if (strcmp(entry->key, GCONF_PATH "/panel_font") == 0) { if ( (str = gconf_value_get_string(entry->value))) { g_free(progdt->font); progdt->font = g_strdup(str); } } else if (strcmp(entry->key, GCONF_PATH "/hide_startup") == 0) { if (gconf_value_get_bool(entry->value)) FLAG_SET(progdt->flags, 6); else FLAG_CLR(progdt->flags, 6); } else if (strcmp(entry->key, GCONF_PATH "/open_transmission") == 0) { if (gconf_value_get_bool(entry->value)) FLAG_SET(progdt->flags, 5); else FLAG_CLR(progdt->flags, 5); } else if (strcmp(entry->key, GCONF_PATH "/use_enter_key") == 0) { if (gconf_value_get_bool(entry->value)) FLAG_SET(progdt->flags, 4); else FLAG_CLR(progdt->flags, 4); } else if (strcmp(entry->key, GCONF_PATH "/clearup_history") == 0) { if (gconf_value_get_bool(entry->value)) FLAG_SET(progdt->flags, 3); else FLAG_CLR(progdt->flags, 3); } else if (strcmp(entry->key, GCONF_PATH "/record_log") == 0) { if (gconf_value_get_bool(entry->value)) FLAG_SET(progdt->flags, 2); else FLAG_CLR(progdt->flags, 2); } else if (strcmp(entry->key, GCONF_PATH "/open_blacklist") == 0) { if (gconf_value_get_bool(entry->value)) FLAG_SET(progdt->flags, 1); else FLAG_CLR(progdt->flags, 1); } else if (strcmp(entry->key, GCONF_PATH "/proof_shared") == 0) { if (gconf_value_get_bool(entry->value)) FLAG_SET(progdt->flags, 0); else FLAG_CLR(progdt->flags, 0); } else if (strcmp(entry->key, GCONF_PATH "/trans_tip") == 0) { if ( (str = gconf_value_get_string(entry->value))) { g_free(progdt->transtip); progdt->transtip = g_strdup(str); } } else if (strcmp(entry->key, GCONF_PATH "/msg_tip") == 0) { if ( (str = gconf_value_get_string(entry->value))) { g_free(progdt->transtip); progdt->transtip = g_strdup(str); } } else if (strcmp(entry->key, GCONF_PATH "/volume_degree") == 0) { progdt->volume = gconf_value_get_float(entry->value); } else if (strcmp(entry->key, GCONF_PATH "/transnd_support") == 0) { if (gconf_value_get_bool(entry->value)) FLAG_SET(progdt->sndfgs, 2); else FLAG_CLR(progdt->sndfgs, 2); } else if (strcmp(entry->key, GCONF_PATH "/msgsnd_support") == 0) { if (gconf_value_get_bool(entry->value)) FLAG_SET(progdt->sndfgs, 1); else FLAG_CLR(progdt->sndfgs, 1); } else if (strcmp(entry->key, GCONF_PATH "/sound_support") == 0) { if (gconf_value_get_bool(entry->value)) FLAG_SET(progdt->sndfgs, 0); else FLAG_CLR(progdt->sndfgs, 0); } /* 如果需要更新则调用更新处理函数 */ if (update) CoreThread::UpdateMyInfo(); } iptux-0.6.3/src/ProgramData.h000077500000000000000000000052601257720006400160430ustar00rootroot00000000000000// // C++ Interface: ProgramData // // Description: 与iptux相关的程序数据 // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef PROGRAMDATA_H #define PROGRAMDATA_H #include "sys.h" #include "net.h" #include "deplib.h" /* flags // 消息(:7);当有消息时自动打开聊天窗口 // 图标(:6);程序启动后只显示托盘图标而不显示面板 // 传输(:5);当有文件传输时自动打开文件传输窗口 // enter(:4);使用Enter键发送消息 // 历史(:3);关闭好友对话框后自动清空聊天历史 // 日志(:2);开启日志记录功能 // 黑名单(:1);不允许删除的好友再出现 // 共享(:0);好友请求本人的共享文件时需要得到确认 *//* sndfgs // 传输(:2);文件传输完成后需要播放提示音 // 消息(:1);有消息到来后需要播放提示音 // 声音(:0);是否需要提示音 */ class ProgramData { public: ProgramData(); ~ProgramData(); void InitSublayer(); void WriteProgData(); GSList *CopyNetSegment(); char *FindNetSegDescription(in_addr_t ipv4); char *nickname; //昵称 * char *mygroup; //所属群组 * char *myicon; //个人头像 * char *path; //存档路径 * char *sign; //个性签名 * char *codeset; //候选编码 * char *encode; //默认通信编码 * char *palicon; //默认头像 * char *font; //面板字体 * uint8_t flags; //6 图标,5 传输:4 enter:3 历史:2 日志:1 黑名单:0 共享 char *transtip; //传输完成提示声音 * char *msgtip; //消息到来提示声音 * double volume; //音量控制 uint8_t sndfgs; //2 传输:1 消息:0 声音 GSList *netseg; //需要通知登录的IP段 GRegex *urlregex; //URL正则表达式 GdkCursor *xcursor, *lcursor; //光标 GtkTextTagTable *table; //tag table guint cnxnid; //GConfClient连接ID struct timeval timestamp; //程序数据时间戳 pthread_mutex_t mutex; //锁 private: void ReadProgData(); void AddGconfNotify(); void CheckIconTheme(); void CreateRegex(); void CreateCursor(); void CreateTagTable(); void WriteNetSegment(GConfClient *client); void ReadNetSegment(GConfClient *client); private: static void GconfNotifyFunc(GConfClient *client, guint cnxnid, GConfEntry *entry, ProgramData *progdt); }; #endif iptux-0.6.3/src/RecvFile.cpp000077500000000000000000000047171257720006400157020ustar00rootroot00000000000000// // C++ Implementation: RecvFile // // Description: // // // Author: cwll ,(C) 2012.02 // Jally , (C) 2008 // 2012.02:把文件接收确认和选择放在了聊天窗口,所以这个类的大部分功能都不用了 // // Copyright: See COPYING file that comes with this distribution // // #include "CoreThread.h" #include "RecvFile.h" #include "RecvFileData.h" #include "ProgramData.h" #include "callback.h" #include "utils.h" extern ProgramData progdt; extern CoreThread cthrd; /** * 类构造函数. */ RecvFile::RecvFile() { } /** * 类析构函数. */ RecvFile::~RecvFile() { } /** * 文件接受入口. * @param para 文件参数 */ void RecvFile::RecvEntry(GData *para) { RecvFile *rfile; rfile = new RecvFile; rfile->ParseFilePara(¶); g_datalist_clear(¶); //para提供的数据已经没用了,秒掉它 delete rfile;//待接上文件的信息已存入中心节点可以删除了 } /** * 分析文件参数. * @param para 文件参数 */ void RecvFile::ParseFilePara(GData **para) { PalInfo *pal; FileInfo *file; char *extra; uint32_t packetn; pal = (PalInfo *)g_datalist_get_data(para, "palinfo"); extra = (char *)g_datalist_get_data(para, "extra-data"); packetn = GPOINTER_TO_UINT(g_datalist_get_data(para, "packetno")); while (extra && *extra) { file = DivideFileinfo(&extra); file->packetn = packetn; file->fileown = pal; cthrd.PushItemToEnclosureList(file); } } /** * 从文件信息串中分离出文件信息数据. * @param extra 文件信息串 * @return 文件信息数据 */ FileInfo *RecvFile::DivideFileinfo(char **extra) { FileInfo *file; file = new FileInfo; file->fileid = iptux_get_dec_number(*extra, ':', 0); file->fileattr = iptux_get_hex_number(*extra, ':', 4); file->filesize = iptux_get_hex64_number(*extra, ':', 2); file->filepath = ipmsg_get_filename(*extra, ':', 1); file->filectime = iptux_get_hex_number(*extra, ':', 3); file->finishedsize = 0; //分割,格式1(\a) 格式2(:\a) 格式3(\a:) 格式4(:\a:) *extra = strchr(*extra, '\a'); if (*extra) //跳过'\a'字符 (*extra)++; if (*extra && (**extra == ':')) //跳过可能存在的':'字符 (*extra)++; return file; } iptux-0.6.3/src/RecvFile.h000077500000000000000000000012231257720006400153340ustar00rootroot00000000000000// // C++ Interface: RecvFile // // Description: // 接受相关的文件信息,不包含文件数据 // // Author: cwll ,(C) 2012.02 // Jally , (C) 2008 // 2012.02:把文件接收确认和选择放在了聊天窗口,所以这个类的大部分功能都不用了 // // Copyright: See COPYING file that comes with this distribution // // #ifndef RECVFILE_H #define RECVFILE_H #include "mess.h" class RecvFile { public: RecvFile(); ~RecvFile(); static void RecvEntry(GData *para); private: void ParseFilePara(GData **para); FileInfo *DivideFileinfo(char **extra); }; #endif iptux-0.6.3/src/RecvFileData.cpp000066400000000000000000000427731257720006400164750ustar00rootroot00000000000000// // C++ Implementation: RecvFileData // // Description: // // // Author: Jally , (C) 2009 // // Copyright: See COPYING file that comes with this distribution // // #include "RecvFileData.h" #include "ProgramData.h" #include "MainWindow.h" #include "LogSystem.h" #include "SoundSystem.h" #include "AnalogFS.h" #include "Command.h" #include "wrapper.h" #include "output.h" #include "utils.h" #include extern ProgramData progdt; extern MainWindow mwin; extern LogSystem lgsys; extern SoundSystem sndsys; /** * 类构造函数. * @param fl 文件信息数据 */ RecvFileData::RecvFileData(FileInfo *fl):file(fl), para(NULL), terminate(false), sumsize(0) { g_datalist_init(¶); gettimeofday(&tasktime, NULL); /* gettimeofday(&filetime, NULL);//个人感觉没必要 */ } /** * 类析构函数. */ RecvFileData::~RecvFileData() { g_datalist_clear(¶); } /** * 接收文件数据入口. */ void RecvFileData::RecvFileDataEntry() { /* 创建UI参考数据,并将数据主动加入UI */ gdk_threads_enter(); CreateUIPara(); mwin.UpdateItemToTransTree(¶); if (FLAG_ISSET(progdt.flags, 5)) mwin.OpenTransWindow(); gdk_threads_leave(); /* 分类处理 */ switch (GET_MODE(file->fileattr)) { case IPMSG_FILE_REGULAR: RecvRegularFile(); break; case IPMSG_FILE_DIR: RecvDirFiles(); break; default: break; } /* 主动更新UI */ gdk_threads_enter(); UpdateUIParaToOver(); mwin.UpdateItemToTransTree(¶); gdk_threads_leave(); /* 处理成功则播放提示音 */ if (!terminate && FLAG_ISSET(progdt.sndfgs, 2)) sndsys.Playing(progdt.transtip); } /** * 获取UI参考数据. * @return UI参考数据 */ GData **RecvFileData::GetTransFilePara() { return ¶ } /** * 终止过程处理. */ void RecvFileData::TerminateTrans() { terminate = true; } /** * 创建UI参考数据. */ void RecvFileData::CreateUIPara() { GtkIconTheme *theme; GdkPixbuf *pixbuf; struct in_addr addr; theme = gtk_icon_theme_get_default(); if ( (pixbuf = gtk_icon_theme_load_icon(theme, "tip-recv", MAX_ICONSIZE, GtkIconLookupFlags(0), NULL))) g_datalist_set_data_full(¶, "status", pixbuf, GDestroyNotify(g_object_unref)); g_datalist_set_data(¶, "task", (gpointer)(_("receive"))); g_datalist_set_data_full(¶, "peer", g_strdup(file->fileown->name), GDestroyNotify(g_free)); addr.s_addr = file->fileown->ipv4; g_datalist_set_data_full(¶, "ip", g_strdup(inet_ntoa(addr)), GDestroyNotify(g_free)); g_datalist_set_data_full(¶, "filename", ipmsg_get_filename_me(file->filepath, NULL), GDestroyNotify(g_free)); g_datalist_set_data_full(¶, "filelength", numeric_to_size(file->filesize), GDestroyNotify(g_free)); g_datalist_set_data(¶, "finishlength", (gpointer)("0B")); g_datalist_set_data(¶, "progress", GINT_TO_POINTER(0)); g_datalist_set_data(¶, "pro-text", (gpointer)("0.0%")); g_datalist_set_data(¶, "cost", (gpointer)("00:00:00")); g_datalist_set_data(¶, "remain", (gpointer)(_("unknown"))); g_datalist_set_data(¶, "rate", (gpointer)("0B/s")); g_datalist_set_data(¶,"filepath",file->filepath); g_datalist_set_data(¶, "data", this); } /** * 接收常规文件. */ void RecvFileData::RecvRegularFile() { AnalogFS afs; Command cmd; int64_t finishsize; int sock, fd; struct utimbuf timebuf; /* 创建文件传输套接口 */ if ((sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) { pop_error(_("Fatal Error!!\nFailed to create new socket!\n%s"), strerror(errno)); exit(1); } /* 请求文件数据 */ if (!cmd.SendAskData(sock, file->fileown, file->packetn, file->fileid, 0)) { close(sock); terminate = true; //标记处理过程失败 return; } /* 打开文件 */ if ((fd = afs.open(file->filepath, O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE, 00644)) == -1) { close(sock); terminate = true; return; } /* 接收文件数据 */ gettimeofday(&filetime, NULL); finishsize = RecvData(sock, fd, file->filesize, 0); close(fd); if(file->filectime != 0) { timebuf.actime = int(file->filectime); timebuf.modtime = int(file->filectime); utime(file->filepath,&timebuf); } // sumsize += finishsize; /* 考察处理结果 */ if (finishsize < file->filesize) { terminate = true; lgsys.SystemLog(_("Failed to receive the file \"%s\" from %s!"), file->filepath, file->fileown->name); } else { lgsys.SystemLog(_("Receive the file \"%s\" from %s successfully!"), file->filepath, file->fileown->name); } /* 关闭文件传输套接口 */ close(sock); } /** * 接收目录文件. */ void RecvFileData::RecvDirFiles() { AnalogFS afs; Command cmd; gchar *dirname, *pathname, *filename, *filectime,*filemtime; int64_t filesize, finishsize; uint32_t headsize, fileattr; int sock, fd; ssize_t size; size_t len; bool result; struct utimbuf timebuf; /* 创建文件传输套接口 */ if ((sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) { pop_error(_("Fatal Error!!\nFailed to create new socket!\n%s"), strerror(errno)); exit(1); } /* 请求目录文件 */ if (!cmd.SendAskFiles(sock, file->fileown, file->packetn, file->fileid)) { close(sock); terminate = true; //标记处理过程失败 return; } /* 转到文件存档目录 */ g_free(ipmsg_get_filename_me(file->filepath, &pathname)); afs.mkdir(pathname, 0777); afs.chdir(pathname); g_free(pathname); /* 接收目录数据 */ result = false; //预设任务处理失败 len = 0; //预设缓冲区有效数据量为0 while (!terminate) { /* 读取足够的数据,并分析数据头 */ if ((size = read_ipmsg_fileinfo(sock, buf, MAX_SOCKLEN, len)) == -1) break; headsize = iptux_get_hex_number(buf, ':', 0); filename = ipmsg_get_filename(buf, ':', 1); filesize = iptux_get_hex64_number(buf, ':', 2); fileattr = iptux_get_hex_number(buf, ':', 3); filectime = iptux_get_section_string(buf, ':', 4); filemtime = iptux_get_section_string(buf, ':', 5); if (filectime != NULL) timebuf.actime = int(iptux_get_hex_number(filectime, '=', 1)); if (filemtime != NULL) timebuf.modtime = int(iptux_get_hex_number(filemtime, '=', 1)); len = size - headsize; //更新缓冲区有效数据量 /* 转码(如果好友不兼容iptux协议) */ if (!FLAG_ISSET(file->fileown->flags, 0) && strcasecmp(file->fileown->encode, "utf-8") != 0 && (dirname = convert_encode(filename, "utf-8", file->fileown->encode))) g_free(filename); else dirname = filename; /* 更新UI参考值 */ //要有谁敢在下一段代码中释放(dirname),那可别怪我没提醒哦 g_datalist_set_data_full(¶, "filename", dirname, GDestroyNotify(g_free)); g_datalist_set_data_full(¶, "filelength",numeric_to_size(filesize), GDestroyNotify(g_free)); g_datalist_set_data(¶, "finishlength", (gpointer)("0B")); g_datalist_set_data(¶, "progress", GINT_TO_POINTER(0)); g_datalist_set_data(¶, "pro-text", (gpointer)("0.0%")); g_datalist_set_data(¶, "cost", (gpointer)("00:00:00")); g_datalist_set_data(¶, "remain", (gpointer)(_("unknown"))); g_datalist_set_data(¶, "rate", (gpointer)("0B/s")); /* 选择处理方案 */ gettimeofday(&filetime, NULL); switch (GET_MODE(fileattr)) { case IPMSG_FILE_RETPARENT: afs.chdir(".."); if (len) memmove(buf, buf + headsize, len); if( strlen(afs.cwd()) < strlen(file->filepath)) { //如果这时候还不成功结束就会陷入while开关第1句的死循环 result = true; goto end; } continue; case IPMSG_FILE_DIR: afs.mkdir(dirname, 0777); afs.chdir(dirname); if (len) memmove(buf, buf + headsize, len); continue; case IPMSG_FILE_REGULAR: if ((fd = afs.open(dirname, O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE, 00644)) == -1) goto end; break; default: if ((fd = open("/dev/null", O_WRONLY)) == -1) goto end; break; } /* 处理缓冲区剩余数据&读取文件数据 */ size = len < filesize ? len : filesize; if (xwrite(fd, buf + headsize, size) == -1) { close(fd); goto end; } if (size == filesize) { //文件数据读取已完成 len -= size; if (len) memmove(buf, buf + headsize + size, len); finishsize = size; } else { //尚需继续读取文件数据 len = 0; //首先标记缓冲区已无有效数据 finishsize = RecvData(sock, fd, filesize, size); if (finishsize < filesize) { close(fd); goto end; } } close(fd); if(GET_MODE(fileattr) == IPMSG_FILE_REGULAR) { pathname = ipmsg_get_pathname_full(afs.cwd(),dirname); if(utime(pathname,&timebuf) < 0) g_print("Error to modify the file %s's filetime!\n",pathname); g_free(pathname); } // sumsize += filesize; } result = true; /* 考察处理结果 */ end: if (!result) { terminate = true; lgsys.SystemLog(_("Failed to receive the directory \"%s\" from %s!"), file->filepath, file->fileown->name); } else { lgsys.SystemLog(_("Receive the directory \"%s\" from %s successfully!"), file->filepath, file->fileown->name); } /* 关闭文件传输套接口 */ close(sock); } /** * 接收文件数据. * @param sock tcp socket * @param fd file descriptor * @param filesize 文件总长度 * @param offset 已读取数据量 * @return 完成数据量 */ int64_t RecvFileData::RecvData(int sock, int fd, int64_t filesize, int64_t offset) { int64_t tmpsize, finishsize; struct timeval val1, val2; float difftime, progress; uint32_t rate; ssize_t size; /* 如果文件数据已经完全被接收,则直接返回 */ if (offset == filesize) return filesize; /* 接收数据 */ tmpsize = finishsize = offset; //初始化已读取数据量 gettimeofday(&val1, NULL); //初始化起始时间 do { /* 接收数据并写入磁盘 */ size = MAX_SOCKLEN < filesize - finishsize ? MAX_SOCKLEN : filesize - finishsize; if ((size = xread(sock, buf, size)) == -1) return finishsize; if (size > 0 && xwrite(fd, buf, size) == -1) return finishsize; finishsize += size; sumsize += size; file->finishedsize = sumsize; /* 判断是否需要更新UI参考值 */ gettimeofday(&val2, NULL); difftime = difftimeval(val2, val1); if (difftime >= 1) { /* 更新UI参考值 */ progress = percent(finishsize, filesize); rate = (uint32_t)((finishsize - tmpsize) / difftime); g_datalist_set_data_full(¶, "finishlength", numeric_to_size(finishsize), GDestroyNotify(g_free)); g_datalist_set_data(¶, "progress", GINT_TO_POINTER(GINT(progress))); g_datalist_set_data_full(¶, "pro-text", g_strdup_printf("%.1f", progress), GDestroyNotify(g_free)); g_datalist_set_data_full(¶, "cost", numeric_to_time( (uint32_t)(difftimeval(val2, filetime))), GDestroyNotify(g_free)); g_datalist_set_data_full(¶, "remain", numeric_to_time( (uint32_t)((filesize - finishsize) / rate)), GDestroyNotify(g_free)); g_datalist_set_data_full(¶, "rate", numeric_to_rate(rate), GDestroyNotify(g_free)); // g_datalist_set_data_full(¶, "finishsize", // numeric_to_str(sumsize), // GDestroyNotify(g_free)); val1 = val2; //更新时间参考点 tmpsize = finishsize; //更新下载量 } } while (!terminate && size && finishsize < filesize); return finishsize; } /** * 更新UI参考数据到任务结束. */ void RecvFileData::UpdateUIParaToOver() { GtkIconTheme *theme; GdkPixbuf *pixbuf; struct timeval time; const char *statusfile; theme = gtk_icon_theme_get_default(); statusfile = terminate ? "tip-error" : "tip-finish"; if ( (pixbuf = gtk_icon_theme_load_icon(theme, statusfile, MAX_ICONSIZE, GtkIconLookupFlags(0), NULL))) g_datalist_set_data_full(¶, "status", pixbuf, GDestroyNotify(g_object_unref)); if (!terminate && GET_MODE(file->fileattr) == IPMSG_FILE_DIR) { g_datalist_set_data_full(¶, "filename", ipmsg_get_filename_me(file->filepath, NULL), GDestroyNotify(g_free)); g_datalist_set_data_full(¶, "filelength", numeric_to_size(sumsize), GDestroyNotify(g_free)); file->finishedsize = file->filesize; } if (!terminate) { gettimeofday(&time, NULL); g_datalist_set_data_full(¶, "finishlength", numeric_to_size(sumsize), GDestroyNotify(g_free)); g_datalist_set_data(¶, "progress", GINT_TO_POINTER(100)); g_datalist_set_data(¶, "pro-text", (gpointer)("100%")); g_datalist_set_data_full(¶, "cost", numeric_to_time( (uint32_t)(difftimeval(time, tasktime))), GDestroyNotify(g_free)); g_datalist_set_data(¶, "remain", NULL); g_datalist_set_data(¶, "rate", NULL); file->finishedsize = file->filesize; } g_datalist_set_data(¶, "data", NULL); } iptux-0.6.3/src/RecvFileData.h000066400000000000000000000020721257720006400161260ustar00rootroot00000000000000// // C++ Interface: RecvFileData // // Description: // 接收文件数据 // // Author: Jally , (C) 2009 // // Copyright: See COPYING file that comes with this distribution // // #ifndef RECVFILEDATA_H #define RECVFILEDATA_H #include "mess.h" class RecvFileData: public TransAbstract { public: RecvFileData(FileInfo *fl); ~RecvFileData(); void RecvFileDataEntry(); virtual GData **GetTransFilePara(); virtual void TerminateTrans(); private: void CreateUIPara(); void RecvRegularFile(); void RecvDirFiles(); int64_t RecvData(int sock, int fd, int64_t filesize, int64_t offset); void UpdateUIParaToOver(); FileInfo *file; //文件信息 GData *para; //UI参考数据 bool terminate; //终止标志(也作处理结果标识) int64_t sumsize; //文件(目录)总大小 char buf[MAX_SOCKLEN]; //数据缓冲区 struct timeval tasktime, filetime; //任务开始时间&文件开始时间 }; #endif iptux-0.6.3/src/RevisePal.cpp000077500000000000000000000353201257720006400160670ustar00rootroot00000000000000// // C++ Implementation: RevisePal // // Description: // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #include "RevisePal.h" #include "CoreThread.h" #include "MainWindow.h" #include "callback.h" #include "utils.h" extern CoreThread cthrd; extern MainWindow mwin; /** * 类构造函数. * @param pl */ RevisePal::RevisePal(PalInfo *pl):widset(NULL), mdlset(NULL), pal(pl) { InitSublayer(); } /** * 类析构函数. */ RevisePal::~RevisePal() { ClearSublayer(); } /** * 修正好友数据入口. * @param pal class PalInfo */ void RevisePal::ReviseEntry(PalInfo *pal) { RevisePal rpal(pal); GtkWidget *dialog; /* 创建对话框 */ dialog = rpal.CreateMainDialog(); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), rpal.CreateAllArea(), TRUE, TRUE, 0); rpal.SetAllValue(); /* 运行对话框 */ gtk_widget_show_all(dialog); switch (gtk_dialog_run(GTK_DIALOG(dialog))) { case GTK_RESPONSE_OK: rpal.ApplyReviseData(); break; default: break; } gtk_widget_destroy(dialog); } /** * 初始化底层数据. */ void RevisePal::InitSublayer() { GtkTreeModel *model; g_datalist_init(&widset); g_datalist_init(&mdlset); model = CreateIconModel(); g_datalist_set_data_full(&mdlset, "icon-model", model, GDestroyNotify(g_object_unref)); FillIconModel(model); } /** * 清空底层数据. */ void RevisePal::ClearSublayer() { g_datalist_clear(&widset); g_datalist_clear(&mdlset); } /** * 创建主对话框窗体. * @return 对话框 */ GtkWidget *RevisePal::CreateMainDialog() { GtkWidget *dialog; dialog = gtk_dialog_new_with_buttons(_("Change Pal's Information"), GTK_WINDOW(mwin.ObtainWindow()), GTK_DIALOG_MODAL, GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK); gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); gtk_container_set_border_width(GTK_CONTAINER(dialog), 5); gtk_widget_set_size_request(dialog, 400, -1); g_datalist_set_data(&widset, "dialog-widget", dialog); return dialog; } /** * 创建所有区域窗体. * @return 主窗体 */ GtkWidget *RevisePal::CreateAllArea() { GtkWidget *box, *hbox; GtkWidget *label, *button, *widget; GtkTreeModel *model; box = gtk_vbox_new(FALSE, 0); /* 好友昵称 */ hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); label = gtk_label_new(_("Pal's nickname:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); widget = gtk_entry_new(); g_object_set(widget, "has-tooltip", TRUE, NULL); gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 0); g_signal_connect(widget, "query-tooltip", G_CALLBACK(entry_query_tooltip), _("Please input pal's new nickname!")); g_datalist_set_data(&widset, "nickname-entry-widget", widget); /* 好友群组 */ hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); label = gtk_label_new(_("Pal's group name:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); widget = gtk_entry_new(); g_object_set(widget, "has-tooltip", TRUE, NULL); gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 0); g_signal_connect(widget, "query-tooltip", G_CALLBACK(entry_query_tooltip), _("Please input pal's new group name!")); g_datalist_set_data(&widset, "group-entry-widget", widget); /* 好友系统编码 */ hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); label = gtk_label_new(_("System coding:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); widget = gtk_entry_new(); g_object_set(widget, "has-tooltip", TRUE, NULL); gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 0); g_signal_connect(widget, "query-tooltip", G_CALLBACK(entry_query_tooltip), _("Be SURE to know what you are doing!")); g_datalist_set_data(&widset, "encode-entry-widget", widget); /* 好友头像 */ hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); label = gtk_label_new(_("Pal's face picture:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "icon-model")); widget = CreateIconTree(model); gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 0); g_datalist_set_data(&widset, "icon-combo-widget", widget); button = gtk_button_new_with_label("..."); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); g_signal_connect(button, "clicked", G_CALLBACK(AddNewIcon), &widset); /* 协议兼容性 */ hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); widget = gtk_check_button_new_with_label( _("Be compatible with iptux's protocol (DANGEROUS)")); gtk_box_pack_start(GTK_BOX(hbox), widget, FALSE, FALSE, 0); g_datalist_set_data(&widset, "compatible-check-widget", widget); return box; } /** * 给界面预设数据. */ void RevisePal::SetAllValue() { GtkWidget *widget; GtkTreeModel *model; gint active; /* 预置昵称 */ widget = GTK_WIDGET(g_datalist_get_data(&widset, "nickname-entry-widget")); gtk_entry_set_text(GTK_ENTRY(widget), pal->name); /* 预置群组 */ widget = GTK_WIDGET(g_datalist_get_data(&widset, "group-entry-widget")); if (pal->group) gtk_entry_set_text(GTK_ENTRY(widget), pal->group); /* 预置编码 */ widget = GTK_WIDGET(g_datalist_get_data(&widset, "encode-entry-widget")); gtk_entry_set_text(GTK_ENTRY(widget), pal->encode); /* 预置头像 */ widget = GTK_WIDGET(g_datalist_get_data(&widset, "icon-combo-widget")); model = gtk_combo_box_get_model(GTK_COMBO_BOX(widget)); active = IconfileGetItemPos(model, pal->iconfile); gtk_combo_box_set_active(GTK_COMBO_BOX(widget), active); /* 预置兼容性 */ widget = GTK_WIDGET(g_datalist_get_data(&widset, "compatible-check-widget")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), FLAG_ISSET(pal->flags, 0)); } /** * 应用修正后的数据. */ void RevisePal::ApplyReviseData() { GtkWidget *widget; GdkPixbuf *pixbuf; GtkTreeModel *model; GtkTreeIter iter; char path[MAX_PATHLEN]; gchar *text, *file; const gchar *consttext; gint active; /* 获取昵称 */ widget = GTK_WIDGET(g_datalist_get_data(&widset, "nickname-entry-widget")); if (*(consttext = gtk_entry_get_text(GTK_ENTRY(widget))) != '\0') { g_free(pal->name); pal->name = g_strdup(consttext); } /* 获取群组 */ widget = GTK_WIDGET(g_datalist_get_data(&widset, "group-entry-widget")); g_free(pal->group); if (*(consttext = gtk_entry_get_text(GTK_ENTRY(widget))) != '\0') pal->group = g_strdup(consttext); else pal->group = NULL; /* 获取编码 */ widget = GTK_WIDGET(g_datalist_get_data(&widset, "encode-entry-widget")); text = gtk_editable_get_chars(GTK_EDITABLE(widget), 0, -1); g_strstrip(text); if (*text != '\0') { g_free(pal->encode); pal->encode = text; } else g_free(text); /* 获取头像 */ widget = GTK_WIDGET(g_datalist_get_data(&widset, "icon-combo-widget")); model = gtk_combo_box_get_model(GTK_COMBO_BOX(widget)); active = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); snprintf(path, MAX_PATHLEN, "%d", active); gtk_tree_model_get_iter_from_string(model, &iter, path); gtk_tree_model_get(model, &iter, 1, &file, -1); if (strcmp(pal->iconfile, file) != 0) { snprintf(path, MAX_PATHLEN, __PIXMAPS_PATH "/icon/%s", file); if (access(path, F_OK) != 0) { g_free(file); g_free(pal->iconfile); snprintf(path, MAX_PATHLEN, "%s" ICON_PATH "/%" PRIx32, g_get_user_cache_dir(), pal->ipv4); pal->iconfile = g_strdup_printf("%" PRIx32, pal->ipv4); gtk_tree_model_get(model, &iter, 0, &pixbuf, -1); gdk_pixbuf_save(pixbuf, path, "png", NULL, NULL); gtk_icon_theme_add_builtin_icon(pal->iconfile, MAX_ICONSIZE, pixbuf); g_object_unref(pixbuf); } else { g_free(pal->iconfile); pal->iconfile = file; } } else g_free(file); /* 获取兼容性 */ widget = GTK_WIDGET(g_datalist_get_data(&widset, "compatible-check-widget")); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) FLAG_SET(pal->flags, 0); else FLAG_CLR(pal->flags, 0); /* 设置好友信息已被手工修改 */ FLAG_SET(pal->flags, 2); /* 更新好友信息 */ pthread_mutex_lock(cthrd.GetMutex()); cthrd.UpdatePalToList(pal->ipv4); pthread_mutex_unlock(cthrd.GetMutex()); mwin.UpdateItemToPaltree(pal->ipv4); } /** * 头像树(icon-tree)底层数据结构. * 2,0 icon,1 iconfile \n * 头像;文件名(带后缀) \n * @return icon-model */ GtkTreeModel *RevisePal::CreateIconModel() { GtkListStore *model; model = gtk_list_store_new(2, GDK_TYPE_PIXBUF, G_TYPE_STRING); return GTK_TREE_MODEL(model); } /** * 为头像树(icon-tree)填充底层数据. * @param model icon-model */ void RevisePal::FillIconModel(GtkTreeModel *model) { GtkIconTheme *theme; GdkPixbuf *pixbuf; GtkTreeIter iter; struct dirent *dirt; DIR *dir; char *file; theme = gtk_icon_theme_get_default(); if ( (dir = opendir(__PIXMAPS_PATH "/icon"))) { while ( (dirt = readdir(dir))) { if (strcmp(dirt->d_name, ".") == 0 || strcmp(dirt->d_name, "..") == 0) continue; file = iptux_erase_filename_suffix(dirt->d_name); if ( (pixbuf = gtk_icon_theme_load_icon(theme, file, MAX_ICONSIZE, GtkIconLookupFlags(0), NULL))) { gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, pixbuf, 1, dirt->d_name, -1); g_object_unref(pixbuf); } g_free(file); } closedir(dir); } } /** * 创建头像树(icon-tree). * @param model icon-model * @return 头像树 */ GtkWidget *RevisePal::CreateIconTree(GtkTreeModel *model) { GtkWidget *combo; GtkCellRenderer *cell; combo = gtk_combo_box_new_with_model(model); gtk_combo_box_set_wrap_width(GTK_COMBO_BOX(combo), 5); cell = gtk_cell_renderer_pixbuf_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo), cell, FALSE); gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(combo), cell, "pixbuf", 0, NULL); return combo; } /** * 查询(pathname)文件在(model)中的位置,若没有则加入到后面. * @param model model * @param pathname 文件路径 * @return 位置 */ gint RevisePal::IconfileGetItemPos(GtkTreeModel *model, const char *pathname) { GtkIconTheme *theme; GdkPixbuf *pixbuf; GtkTreeIter iter; const char *ptr; gchar *file; gint result, pos; /* 让ptr指向文件名 */ ptr = strrchr(pathname, '/'); ptr = ptr ? ptr + 1 : pathname; /* 查询model中是否已经存在此文件 */ pos = 0; if (gtk_tree_model_get_iter_first(model, &iter)) { do { gtk_tree_model_get(model, &iter, 1, &file, -1); result = strcmp(ptr, file); g_free(file); if (result == 0) return pos; pos++; } while (gtk_tree_model_iter_next(model, &iter)); } /* 将文件加入model */ if (access(pathname, F_OK) != 0) { theme = gtk_icon_theme_get_default(); file = iptux_erase_filename_suffix(pathname); pixbuf = gtk_icon_theme_load_icon(theme, file, MAX_ICONSIZE, GtkIconLookupFlags(0), NULL); g_free(file); } else pixbuf = gdk_pixbuf_new_from_file_at_size(pathname, MAX_ICONSIZE, MAX_ICONSIZE, NULL); if (pixbuf) { gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, pixbuf, 1, ptr, -1); g_object_unref(pixbuf); } else pos = -1; return pos; } /** * 添加新的头像数据. * @param button button * @param widset widget set */ void RevisePal::AddNewIcon(GtkWidget *button, GData **widset) { GtkWidget *parent, *combo; GtkTreeModel *model; gchar *filename; gint active; parent = GTK_WIDGET(g_datalist_get_data(widset, "dialog-widget")); if (!(filename = choose_file_with_preview( _("Please select a face picture"), parent))) return; combo = GTK_WIDGET(g_object_get_data(G_OBJECT(button), "icon-combo-widget")); model = gtk_combo_box_get_model(GTK_COMBO_BOX(combo)); active = IconfileGetItemPos(model, filename); gtk_combo_box_set_active(GTK_COMBO_BOX(combo), active); g_free(filename); } iptux-0.6.3/src/RevisePal.h000077500000000000000000000017561257720006400155420ustar00rootroot00000000000000// // C++ Interface: RevisePal // // Description:手动更改好友数据 // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef REVISEPAL_H #define REVISEPAL_H #include "mess.h" class RevisePal { public: RevisePal(PalInfo *pl); ~RevisePal(); static void ReviseEntry(PalInfo *pal); private: void InitSublayer(); void ClearSublayer(); GtkWidget *CreateMainDialog(); GtkWidget *CreateAllArea(); void SetAllValue(); void ApplyReviseData(); GtkTreeModel *CreateIconModel(); void FillIconModel(GtkTreeModel *model); GtkWidget *CreateIconTree(GtkTreeModel *model); GData *widset; GData *mdlset; PalInfo *pal; private: static gint IconfileGetItemPos(GtkTreeModel *model, const char *pathname); //回调处理部分 private: static void AddNewIcon(GtkWidget *button, GData **widset); }; #endif iptux-0.6.3/src/SendFile.cpp000077500000000000000000000143271257720006400156720ustar00rootroot00000000000000// // C++ Implementation: SendFile // // Description: // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #include "SendFile.h" #include "SendFileData.h" #include "CoreThread.h" #include "Command.h" #include "AnalogFS.h" #include "utils.h" extern CoreThread cthrd; SendFile::SendFile() { } SendFile::~SendFile() { } /** * 发送本机共享文件信息入口. * @param pal class PalInfo */ void SendFile::SendSharedInfoEntry(PalInfo *pal) { GSList *list; pthread_mutex_lock(cthrd.GetMutex()); list = cthrd.GetPublicFileList(); SendFileInfo(pal, IPTUX_SHAREDOPT, list); pthread_mutex_unlock(cthrd.GetMutex()); } /** * 发送文件信息入口. * @param pal class PalInfo * @param flist 文件信息链表 * @note 文件路径链表中的数据将被本函数处理掉 */ void SendFile::SendFileInfoEntry(PalInfo *pal, GSList *flist) { /* 发送文件信息 */ SendFileInfo(pal, 0, flist); } /** * 广播文件信息入口. * @param plist 好友链表 * @param flist 文件信息链表 * @note 文件路径链表中的数据将被本函数处理掉 */ void SendFile::BcstFileInfoEntry(GSList *plist, GSList *flist) { BcstFileInfo(plist, 0, flist); } /** * 请求文件数据入口. * @param sock tcp socket * @param fileattr 文件类型 * @param attach 附加数据 */ void SendFile::RequestDataEntry(int sock, uint32_t fileattr, char *attach) { struct sockaddr_in addr; socklen_t len; PalInfo *pal; FileInfo *file; uint32_t fileid; uint32_t filectime; /* 检查文件属性是否匹配 */ fileid = iptux_get_hex_number(attach, ':', 1); file = (FileInfo *)cthrd.GetFileFromAll(fileid); /* 兼容windows版信鸽(IPMSG) ,这里的信鸽不是飞鸽传书(IPMSG)*/ if(!file) { fileid = iptux_get_dec_number(attach, ':', 1); file = (FileInfo *)cthrd.GetFileFromAll(fileid); } /* 兼容adroid版信鸽(IPMSG) */ if(!file) { fileid = iptux_get_hex_number(attach, ':', 0); filectime = iptux_get_dec_number(attach, ':', 1); file = (FileInfo *)cthrd.GetFileFromAllWithPacketN(fileid,filectime); } if (!file || GET_MODE(file->fileattr) != GET_MODE(fileattr)) return; /* 检查好友数据是否存在 */ len = sizeof(addr); getpeername(sock, (struct sockaddr *)&addr, &len); if (!(pal = cthrd.GetPalFromList(addr.sin_addr.s_addr))) return; /* 发送文件数据 */ // /** // *文件信息可能被删除或修改,必须单独复制一份. // */ // file->fileown = pal; ThreadSendFile(sock, file); } /** * 发送文件信息. * @param pal class PalInfo * @param opttype 命令字选项 * @param filist 文件信息链表 */ void SendFile::SendFileInfo(PalInfo *pal, uint32_t opttype, GSList *filist) { AnalogFS afs; Command cmd; char buf[MAX_UDPLEN]; size_t len; char *ptr, *name; GSList *tlist; FileInfo *file; /* 初始化 */ len = 0; ptr = buf; buf[0] = '\0'; /* 将文件信息写入缓冲区 */ tlist = filist; while (tlist) { file = (FileInfo *)tlist->data; if (access(file->filepath, F_OK) == -1) { tlist = g_slist_next(tlist); continue; } name = ipmsg_get_filename_pal(file->filepath); //获取面向好友的文件名 file->packetn = cmd.Packetn(); snprintf(ptr, MAX_UDPLEN - len, "%" PRIu32 ":%s:%" PRIx64 ":%" PRIx32 ":%" PRIx32 ":\a", file->fileid, name, file->filesize, file->filectime, file->fileattr); g_free(name); len += strlen(ptr); ptr = buf + len; tlist = g_slist_next(tlist); } /* 发送文件信息 */ cmd.SendFileInfo(cthrd.UdpSockQuote(), pal, opttype, buf); } /** * 广播文件信息. * @param plist 好友链表 * @param opttype 命令字选项 * @param filist 文件信息链表 */ void SendFile::BcstFileInfo(GSList *plist, uint32_t opttype, GSList *filist) { AnalogFS afs; Command cmd; char buf[MAX_UDPLEN]; size_t len; char *ptr, *name; GSList *tlist,*pallist,*filelist; FileInfo *file; /* 初始化 */ len = 0; ptr = buf; buf[0] = '\0'; pallist = plist; /* 将文件信息写入缓冲区 */ while (pallist) { filelist = filist; while (filelist) { file = (FileInfo *)filelist->data; if(file->fileown == (PalInfo *)pallist->data) { if (access(file->filepath, F_OK) == -1) { filelist = g_slist_next(filelist); continue; } name = ipmsg_get_filename_pal(file->filepath); //获取面向好友的文件名 file->filesize = afs.ftwsize(file->filepath); //不得不计算文件长度了 file->packetn = cmd.Packetn(); snprintf(ptr, MAX_UDPLEN - len, "%" PRIu32 ":%s:%" PRIx64 ":%" PRIx32 ":%" PRIx32 ":\a:", file->fileid, name, file->filesize, file->filectime, file->fileattr); g_free(name); len += strlen(ptr); ptr = buf + len; } filelist = g_slist_next(filelist); } cmd.SendFileInfo(cthrd.UdpSockQuote(), (PalInfo *)pallist->data, opttype, buf); pallist = g_slist_next(pallist); } } /** * 发送文件数据. * @param sock tcp socket * @param file 文件信息 */ void SendFile::ThreadSendFile(int sock, FileInfo *file) { SendFileData sfdt(sock, file); sfdt.SendFileDataEntry(); } iptux-0.6.3/src/SendFile.h000077500000000000000000000014631257720006400153340ustar00rootroot00000000000000// // C++ Interface: SendFile // // Description: // 发送相关的文件信息,不包含文件数据 // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef SENDFILE_H #define SENDFILE_H #include "mess.h" class SendFile { public: SendFile(); ~SendFile(); void SendSharedInfoEntry(PalInfo *pal); void SendFileInfoEntry(PalInfo *pal, GSList *flist); void BcstFileInfoEntry(GSList *plist, GSList *flist); void RequestDataEntry(int sock, uint32_t fileattr, char *attach); private: void SendFileInfo(PalInfo *pal, uint32_t opttype, GSList *filist); void BcstFileInfo(GSList *plist, uint32_t opttype, GSList *filist); void ThreadSendFile(int sock, FileInfo *file); }; #endif iptux-0.6.3/src/SendFileData.cpp000066400000000000000000000375261257720006400164670ustar00rootroot00000000000000// // C++ Implementation: SendFileData // // Description: // // // Author: Jally , (C) 2009 // // Copyright: See COPYING file that comes with this distribution // // #include #include #include #include "SendFileData.h" #include "ProgramData.h" #include "MainWindow.h" #include "LogSystem.h" #include "SoundSystem.h" #include "AnalogFS.h" #include "wrapper.h" #include "utils.h" extern ProgramData progdt; extern MainWindow mwin; extern LogSystem lgsys; extern SoundSystem sndsys; /** * 类构造函数. * @param sk tcp socket * @param fl 文件信息数据 */ SendFileData::SendFileData(int sk, FileInfo *fl):sock(sk), file(fl), para(NULL), terminate(false), sumsize(0) { g_datalist_init(¶); gettimeofday(&tasktime, NULL); /* gettimeofday(&filetime, NULL);//个人感觉没必要 */ } /** * 类析构函数. */ SendFileData::~SendFileData() { g_datalist_clear(¶); } /** * 发送文件数据入口. */ void SendFileData::SendFileDataEntry() { /* 创建UI参考数据,并将数据主动加入UI */ gdk_threads_enter(); CreateUIPara(); mwin.UpdateItemToTransTree(¶); if (FLAG_ISSET(progdt.flags, 5)) mwin.OpenTransWindow(); gdk_threads_leave(); /* 分类处理 */ switch (GET_MODE(file->fileattr)) { case IPMSG_FILE_REGULAR: SendRegularFile(); break; case IPMSG_FILE_DIR: SendDirFiles(); break; default: break; } /* 主动更新UI */ gdk_threads_enter(); UpdateUIParaToOver(); mwin.UpdateItemToTransTree(¶); gdk_threads_leave(); /* 处理成功则播放提示音 */ if (!terminate && FLAG_ISSET(progdt.sndfgs, 2)) sndsys.Playing(progdt.transtip); } /** * 获取UI参考数据. * @return UI参考数据 */ GData **SendFileData::GetTransFilePara() { return ¶ } /** * 终止过程处理. */ void SendFileData::TerminateTrans() { terminate = true; } /** * 创建UI参考数据. */ void SendFileData::CreateUIPara() { GtkIconTheme *theme; GdkPixbuf *pixbuf; struct in_addr addr; theme = gtk_icon_theme_get_default(); if ((pixbuf = gtk_icon_theme_load_icon(theme, "tip-send", MAX_ICONSIZE, GtkIconLookupFlags(0), NULL))) g_datalist_set_data_full(¶, "status", pixbuf, GDestroyNotify(g_object_unref)); g_datalist_set_data(¶, "task", (gpointer)(_("send"))); g_datalist_set_data_full(¶, "peer", g_strdup(file->fileown->name), GDestroyNotify(g_free)); addr.s_addr = file->fileown->ipv4; g_datalist_set_data_full(¶, "ip", g_strdup(inet_ntoa(addr)), GDestroyNotify(g_free)); g_datalist_set_data_full(¶, "filename", ipmsg_get_filename_me(file->filepath, NULL), GDestroyNotify(g_free)); g_datalist_set_data_full(¶, "filelength", numeric_to_size(file->filesize), GDestroyNotify(g_free)); g_datalist_set_data(¶, "finishlength", (gpointer)("0B")); g_datalist_set_data(¶, "progress", GINT_TO_POINTER(0)); g_datalist_set_data(¶, "pro-text", (gpointer)("0.0%")); g_datalist_set_data(¶, "cost", (gpointer)("00:00:00")); g_datalist_set_data(¶, "remain", (gpointer)(_("unknown"))); g_datalist_set_data(¶, "rate", (gpointer)("0B/s")); g_datalist_set_data(¶, "data", this); } /** * 发送常规文件. */ void SendFileData::SendRegularFile() { int64_t finishsize; int fd; /* 打开文件 */ if ((fd = open(file->filepath, O_RDONLY | O_LARGEFILE)) == -1) { terminate = true; //标记处理过程失败 return; } /* 发送文件数据 */ gettimeofday(&filetime, NULL); finishsize = SendData(fd, file->filesize); close(fd); // sumsize += finishsize; /* 考察处理结果 */ if (finishsize < file->filesize) { terminate = true; lgsys.SystemLog(_("Failed to send the file \"%s\" to %s!"), file->filepath, file->fileown->name); } else { lgsys.SystemLog(_("Send the file \"%s\" to %s successfully!"), file->filepath, file->fileown->name); } } /** * 发送目录文件. */ void SendFileData::SendDirFiles() { AnalogFS afs; GQueue dirstack = G_QUEUE_INIT; struct stat64 st; struct dirent *dirt, vdirt; DIR *dir; gchar *dirname, *pathname, *filename; int64_t finishsize; uint32_t headsize; int fd; bool result; /* 转到上传目录位置 */ dirname = ipmsg_get_filename_me(file->filepath, &pathname); afs.chdir(pathname); g_free(pathname); strcpy(vdirt.d_name, dirname); dirt = &vdirt; g_free(dirname); result = false; //预设任务处理失败 dir = NULL; //预设当前目录流无效 goto start; while (!g_queue_is_empty(&dirstack)) { /* 取出最后一次压入堆栈的目录流 */ dir = (DIR *)g_queue_pop_head(&dirstack); /* 发送目录流中的下属数据 */ while (dir && (dirt = readdir(dir))) { if (strcmp(dirt->d_name, ".") == 0 || strcmp(dirt->d_name, "..") == 0) continue; /* 检查文件是否可用 */ start: if (afs.stat(dirt->d_name, &st) == -1 || !(S_ISREG(st.st_mode) || S_ISDIR(st.st_mode))) continue; /* 更新UI参考值 */ g_datalist_set_data_full(¶, "filename", g_strdup(dirt->d_name), GDestroyNotify(g_free)); g_datalist_set_data_full(¶, "filelength", numeric_to_size(st.st_size), GDestroyNotify(g_free)); g_datalist_set_data(¶, "finishlength", (gpointer)("0B")); g_datalist_set_data(¶, "progress", GINT_TO_POINTER(0)); g_datalist_set_data(¶, "pro-text", (gpointer)("0.0%")); g_datalist_set_data(¶, "cost", (gpointer)("00:00:00")); g_datalist_set_data(¶, "remain", (gpointer)(_("unknown"))); g_datalist_set_data(¶, "rate", (gpointer)("0B/s")); /* 转码 */ if (strcasecmp(file->fileown->encode, "utf-8") != 0 && (filename = convert_encode(dirt->d_name, file->fileown->encode, "utf-8"))) { dirname = ipmsg_get_filename_pal(filename); g_free(filename); } else dirname = ipmsg_get_filename_pal(dirt->d_name); /* 构造数据头并发送 */ snprintf(buf, MAX_SOCKLEN, "0000:%s:%.9" PRIx64 ":%lx:%lx=%lx:%lx=%lx:", dirname, S_ISREG(st.st_mode) ? st.st_size :0, S_ISREG(st.st_mode) ? IPMSG_FILE_REGULAR : IPMSG_FILE_DIR, IPMSG_FILE_MTIME,st.st_mtime,IPMSG_FILE_CREATETIME,st.st_ctime); g_free(dirname); headsize = strlen(buf); snprintf(buf, MAX_SOCKLEN, "%.4" PRIx32, headsize); *(buf + 4) = ':'; if (xwrite(sock, buf, headsize) == -1) goto end; /* 选择处理方案 */ gettimeofday(&filetime, NULL); if (S_ISREG(st.st_mode)) { //常规文件 if ((fd = afs.open(dirt->d_name, O_RDONLY | O_LARGEFILE)) == -1) goto end; finishsize = SendData(fd, st.st_size); close(fd); if (finishsize < st.st_size) goto end; // sumsize += finishsize; } else if (S_ISDIR(st.st_mode)) { //目录文件 if (dir) //若当前目录流有效则须压入堆栈 g_queue_push_head(&dirstack, dir); /* 打开下属目录 */ if (!(dir = afs.opendir(dirt->d_name))) goto end; /* 本地端也须转至下属目录 */ afs.chdir(dirt->d_name); } } /* 目录流有效才可向上转 */ if (dir) { /* 关闭当前操作的目录流 */ closedir(dir); dir = NULL; /* 构造向上转的数据头并发送 */ snprintf(buf, MAX_SOCKLEN, "0000:.:0:%lx:%lx=%lx:%lx=%lx:", IPMSG_FILE_RETPARENT, IPMSG_FILE_MTIME,st.st_mtime,IPMSG_FILE_CREATETIME,st.st_ctime); headsize = strlen(buf); snprintf(buf, MAX_SOCKLEN, "%.4" PRIx32, headsize); *(buf + 4) = ':'; if (xwrite(sock, buf, headsize) == -1) goto end; /* 本地端也须向上转一层 */ afs.chdir(".."); } } result = true; /* 考察处理结果 */ end: if (!result) { /* 若当前目录流有效,则必须关闭 */ if (dir) closedir(dir); /* 关闭堆栈中所有的目录流,并清空堆栈 */ g_queue_foreach(&dirstack, GFunc(closedir), NULL); g_queue_clear(&dirstack); lgsys.SystemLog(_("Failed to send the directory \"%s\" to %s!"), file->filepath, file->fileown->name); } else { lgsys.SystemLog(_("Send the directory \"%s\" to %s successfully!"), file->filepath, file->fileown->name); } } /** * 发送文件数据. * @param fd file descriptor * @param filesize 文件总长度 * @return 完成数据量 */ int64_t SendFileData::SendData(int fd, int64_t filesize) { int64_t tmpsize, finishsize; struct timeval val1, val2; float difftime, progress; uint32_t rate; ssize_t size; /* 如果文件长度为0,则无须再进一步处理 */ if (filesize == 0) return 0; tmpsize = finishsize = 0; //初始化已完成数据量 gettimeofday(&val1, NULL); //初始化起始时间 do { /* 读取文件数据并发送 */ size = MAX_SOCKLEN < filesize - finishsize ? MAX_SOCKLEN : filesize - finishsize; if ((size = xread(fd, buf, MAX_SOCKLEN)) == -1) return finishsize; if (size > 0 && xwrite(sock, buf, size) == -1) return finishsize; finishsize += size; sumsize += size; file->finishedsize = sumsize; /* 判断是否需要更新UI参考值 */ gettimeofday(&val2, NULL); difftime = difftimeval(val2, val1); if (difftime >= 1) { /* 更新UI参考值 */ progress = percent(finishsize, filesize); rate = (uint32_t)((finishsize - tmpsize) / difftime); g_datalist_set_data_full(¶, "finishlength", numeric_to_size(finishsize), GDestroyNotify(g_free)); g_datalist_set_data(¶, "progress", GINT_TO_POINTER(GINT(progress))); g_datalist_set_data_full(¶, "pro-text", g_strdup_printf("%.1f", progress), GDestroyNotify(g_free)); g_datalist_set_data_full(¶, "cost", numeric_to_time( (uint32_t)(difftimeval(val2, filetime))), GDestroyNotify(g_free)); g_datalist_set_data_full(¶, "remain", numeric_to_time( (uint32_t)((filesize - finishsize) / rate)), GDestroyNotify(g_free)); g_datalist_set_data_full(¶, "rate", numeric_to_rate(rate), GDestroyNotify(g_free)); val1 = val2; //更新时间参考点 tmpsize = finishsize; //更新下载量 } } while (!terminate && size && finishsize < filesize); return finishsize; } /** * 更新UI参考数据到任务结束. */ void SendFileData::UpdateUIParaToOver() { GtkIconTheme *theme; GdkPixbuf *pixbuf; struct timeval time; const char *statusfile; theme = gtk_icon_theme_get_default(); statusfile = terminate ? "tip-error" : "tip-finish"; if ( (pixbuf = gtk_icon_theme_load_icon(theme, statusfile, MAX_ICONSIZE, GtkIconLookupFlags(0), NULL))) g_datalist_set_data_full(¶, "status", pixbuf, GDestroyNotify(g_object_unref)); if (!terminate && GET_MODE(file->fileattr) == IPMSG_FILE_DIR) { g_datalist_set_data_full(¶, "filename", ipmsg_get_filename_me(file->filepath, NULL), GDestroyNotify(g_free)); g_datalist_set_data_full(¶, "filelength", numeric_to_size(sumsize), GDestroyNotify(g_free)); } if (!terminate) { gettimeofday(&time, NULL); g_datalist_set_data_full(¶, "finishlength", numeric_to_size(sumsize), GDestroyNotify(g_free)); g_datalist_set_data(¶, "progress", GINT_TO_POINTER(100)); g_datalist_set_data(¶, "pro-text", (gpointer)("100%")); g_datalist_set_data_full(¶, "cost", numeric_to_time( (uint32_t)(difftimeval(time, tasktime))), GDestroyNotify(g_free)); g_datalist_set_data(¶, "remain", NULL); g_datalist_set_data(¶, "rate", NULL); } g_datalist_set_data(¶, "data", NULL); } iptux-0.6.3/src/SendFileData.h000066400000000000000000000021321257720006400161150ustar00rootroot00000000000000// // C++ Interface: SendFileData // // Description: // 发送文件数据 // // Author: Jally , (C) 2009 // // Copyright: See COPYING file that comes with this distribution // // #ifndef SENDFILEDATA_H #define SENDFILEDATA_H #include "mess.h" class SendFileData: public TransAbstract { public: SendFileData(int sk, FileInfo *fl); ~SendFileData(); void SendFileDataEntry(); virtual GData **GetTransFilePara(); virtual void TerminateTrans(); private: void CreateUIPara(); void SendRegularFile(); void SendDirFiles(); int64_t SendData(int fd, int64_t filesize); void UpdateUIParaToOver(); int sock; //数据套接口 FileInfo *file; //文件信息 GData *para; //UI参考数据 bool terminate; //终止标志(也作处理结果标识) int64_t sumsize; //文件(目录)总大小 char buf[MAX_SOCKLEN]; //数据缓冲区 struct timeval tasktime, filetime; //任务开始时间&文件开始时间 }; #endif iptux-0.6.3/src/ShareFile.cpp000077500000000000000000000470431257720006400160440ustar00rootroot00000000000000// // C++ Implementation: ShareFile // // Description: // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #include "ShareFile.h" #include "ProgramData.h" #include "CoreThread.h" #include "AnalogFS.h" #include "support.h" #include "dialog.h" #include "utils.h" extern ProgramData progdt; extern CoreThread cthrd; /** * 类构造函数. */ ShareFile::ShareFile():widset(NULL), mdlset(NULL) { InitSublayer(); } /** * 类析构函数. */ ShareFile::~ShareFile() { ClearSublayer(); } /** * 共享文件浏览、更新入口. * @param parent 父窗口指针 */ void ShareFile::ShareEntry(GtkWidget *parent) { ShareFile sfile; GtkWidget *dialog; /* 创建对话框 */ dialog = sfile.CreateMainDialog(parent); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), sfile.CreateAllArea(), TRUE, TRUE, 0); /* 运行对话框 */ gtk_widget_show_all(dialog); mark: switch (gtk_dialog_run(GTK_DIALOG(dialog))) { case GTK_RESPONSE_OK: sfile.ApplySharedData(); break; case GTK_RESPONSE_APPLY: sfile.ApplySharedData(); goto mark; case GTK_RESPONSE_CANCEL: default: break; } gtk_widget_destroy(dialog); } /** * 初始化底层数据. */ void ShareFile::InitSublayer() { GtkTreeModel *model; g_datalist_init(&widset); g_datalist_init(&mdlset); model = CreateFileModel(); g_datalist_set_data_full(&mdlset, "file-model", model, GDestroyNotify(g_object_unref)); FillFileModel(model); } /** * 清空底层数据. */ void ShareFile::ClearSublayer() { g_datalist_clear(&widset); g_datalist_clear(&mdlset); } /** * 创建主对话框窗口. * @param parent 父窗口指针 * @return 对话框 */ GtkWidget *ShareFile::CreateMainDialog(GtkWidget *parent) { GtkWidget *dialog; dialog = gtk_dialog_new_with_buttons(_("Shared Files Management"), GTK_WINDOW(parent), GtkDialogFlags(GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR), _("OK"), GTK_RESPONSE_OK, _("Apply"), GTK_RESPONSE_APPLY, _("Cancel"), GTK_RESPONSE_CANCEL, NULL); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK); gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER); gtk_container_set_border_width(GTK_CONTAINER(dialog), 5); gtk_widget_set_size_request(dialog, 500, 350); g_datalist_set_data(&widset, "dialog-widget", dialog); widget_enable_dnd_uri(dialog); g_signal_connect_swapped(dialog, "drag-data-received", G_CALLBACK(DragDataReceived), this); return dialog; } /** * 创建对话框中所有的窗体. * @return 主窗体 */ GtkWidget *ShareFile::CreateAllArea() { GtkWidget *box, *vbox; GtkWidget *sw, *button, *widget; GtkTreeModel *model; box = gtk_hbox_new(FALSE, 0); /* 加入文件树 */ sw = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_box_pack_end(GTK_BOX(box), sw, TRUE, TRUE, 0); model = GTK_TREE_MODEL(g_datalist_get_data(&mdlset, "file-model")); widget = CreateFileTree(model); gtk_container_add(GTK_CONTAINER(sw), widget); g_datalist_set_data(&widset, "file-treeview-widget", widget); /* 加入N多垃圾按钮 */ vbox = gtk_vbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(box), vbox, FALSE, FALSE, 0); button = gtk_button_new_with_label(_("Add Files")); gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); g_signal_connect_swapped(button, "clicked", G_CALLBACK(AddRegular), this); button = gtk_button_new_with_label(_("Add Folders")); gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); g_signal_connect_swapped(button, "clicked", G_CALLBACK(AddFolder), this); button = gtk_button_new_with_label(_("Delete Resources")); gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); g_signal_connect_swapped(button, "clicked", G_CALLBACK(DeleteFiles), &widset); button = gtk_button_new_with_label(_("Clear Password")); gtk_box_pack_end(GTK_BOX(vbox), button, FALSE, FALSE, 0); g_signal_connect_swapped(button, "clicked", G_CALLBACK(ClearPassword), &widset); button = gtk_button_new_with_label(_("Set Password")); gtk_box_pack_end(GTK_BOX(vbox), button, FALSE, FALSE, 0); g_signal_connect_swapped(button, "clicked", G_CALLBACK(SetPassword), &widset); g_datalist_set_data(&widset, "password-button-widget", button); return box; } /** * 文件树(file-tree)底层数据结构. * 5,0 logo,1 filepath,2 filesize,3 filetype,4 type * 文件图标;文件路径;文件大小;文件类型(串);文件类型(数值) * @return file-model */ GtkTreeModel *ShareFile::CreateFileModel() { GtkListStore *model; model = gtk_list_store_new(5, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT); gtk_tree_sortable_set_default_sort_func(GTK_TREE_SORTABLE(model), GtkTreeIterCompareFunc(FileTreeCompareFunc), NULL, NULL); gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(model), GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, GTK_SORT_ASCENDING); return GTK_TREE_MODEL(model); } /** * 为文件树(file-tree)填充底层数据. * @param model file-model */ void ShareFile::FillFileModel(GtkTreeModel *model) { AnalogFS afs; GdkPixbuf *pixbuf, *rpixbuf, *dpixbuf; GtkTreeIter iter; char *filesize; const char *filetype; FileInfo *file; GSList *tlist; /* 先获取两个文件图标 */ rpixbuf = obtain_pixbuf_from_stock(GTK_STOCK_FILE); dpixbuf = obtain_pixbuf_from_stock(GTK_STOCK_DIRECTORY); /* 将现在的共享文件填入model */ tlist = cthrd.GetPublicFileList(); while (tlist) { file = (FileInfo *)tlist->data; /* 获取文件大小 */ file->filesize = afs.ftwsize(file->filepath); filesize = numeric_to_size(file->filesize); /* 获取文件类型 */ switch (GET_MODE(file->fileattr)) { case IPMSG_FILE_REGULAR: filetype = _("regular"); pixbuf = rpixbuf; break; case IPMSG_FILE_DIR: filetype = _("directory"); pixbuf = dpixbuf; break; default: filetype = _("unknown"); pixbuf = NULL; break; } /* 填入数据 */ gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, pixbuf, 1, file->filepath, 2, filesize, 3, filetype, 4, file->fileattr, -1); /* 烦,释放资源 */ g_free(filesize); /* 转入下一个节点 */ tlist = g_slist_next(tlist); } /* 释放文件图标 */ if (rpixbuf) g_object_unref(rpixbuf); if (dpixbuf) g_object_unref(dpixbuf); } /** * 创建文件树(file-tree). * @param model file-model * @return 文件树 */ GtkWidget *ShareFile::CreateFileTree(GtkTreeModel *model) { GtkWidget *view; GtkTreeViewColumn *column; GtkCellRenderer *cell; GtkTreeSelection *selection; view = gtk_tree_view_new_with_model(model); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(view), TRUE); gtk_tree_view_set_rubber_banding(GTK_TREE_VIEW(view), TRUE); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(view)); gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE); column = gtk_tree_view_column_new(); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_column_set_title(column, _("File")); cell = gtk_cell_renderer_pixbuf_new(); gtk_tree_view_column_pack_start(column, cell, FALSE); gtk_tree_view_column_set_attributes(column, cell, "pixbuf", 0, NULL); cell = gtk_cell_renderer_text_new(); gtk_tree_view_column_pack_start(column, cell, FALSE); gtk_tree_view_column_set_attributes(column, cell, "text", 1, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Size"), cell, "text", 2, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Type"), cell, "text", 3, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); return view; } /** * 应用共享文件数据. */ void ShareFile::ApplySharedData() { GtkWidget *widget; GtkTreeModel *model; GtkTreeIter iter; FileInfo *file; uint32_t fileattr; gchar *filepath; const gchar *passwd; AnalogFS afs; struct stat64 st; /* 更新共享文件链表 */ pthread_mutex_lock(cthrd.GetMutex()); cthrd.ClearFileFromPublic(); cthrd.PbnQuote() = 1; widget = GTK_WIDGET(g_datalist_get_data(&widset, "file-treeview-widget")); model = gtk_tree_view_get_model(GTK_TREE_VIEW(widget)); if (gtk_tree_model_get_iter_first(model, &iter)) { do { gtk_tree_model_get(model, &iter, 1, &filepath, 4, &fileattr, -1); file = new FileInfo; file->fileid = cthrd.PbnQuote()++; /* file->packetn = 0;//没必要设置此字段 */ file->fileattr = fileattr; /* file->filesize = 0;//我喜欢延后处理 */ /* file->fileown = NULL;//没必要设置此字段 */ file->filepath = filepath; if (afs.stat(filepath, &st) == 0) file->filectime = st.st_ctime; cthrd.AttachFileToPublic(file); } while (gtk_tree_model_iter_next(model, &iter)); } pthread_mutex_unlock(cthrd.GetMutex()); /* 更新密码 */ widget = GTK_WIDGET(g_datalist_get_data(&widset, "password-button-widget")); passwd = (const gchar *)g_object_get_data(G_OBJECT(widget), "password"); cthrd.SetAccessPublicLimit(passwd); /* 写出共享文件 */ cthrd.WriteSharedData(); } /** * 增加新的共享文件. * @param list 文件链表 */ void ShareFile::AttachSharedFiles(GSList *list) { AnalogFS afs; GtkWidget *widget; GtkTreeModel *model; GtkTreeIter iter; GdkPixbuf *pixbuf, *rpixbuf, *dpixbuf; struct stat64 st; int64_t pathsize; GSList *tlist; char *filesize; const char *filetype; uint32_t fileattr; /* 获取文件图标 */ rpixbuf = obtain_pixbuf_from_stock(GTK_STOCK_FILE); dpixbuf = obtain_pixbuf_from_stock(GTK_STOCK_DIRECTORY); /* 插入文件树 */ widget = GTK_WIDGET(g_datalist_get_data(&widset, "file-treeview-widget")); model = gtk_tree_view_get_model(GTK_TREE_VIEW(widget)); tlist = list; while (tlist) { if (stat64((const char *)tlist->data, &st) == -1 || !(S_ISREG(st.st_mode) || S_ISDIR(st.st_mode))) { tlist = g_slist_next(tlist); continue; } /* 获取文件大小 */ pathsize = afs.ftwsize((const char *)tlist->data); filesize = numeric_to_size(pathsize); /* 获取文件类型 */ if (S_ISREG(st.st_mode)) { filetype = _("regular"); fileattr = IPMSG_FILE_REGULAR; pixbuf = rpixbuf; } else if (S_ISDIR(st.st_mode)) { filetype = _("directory"); fileattr = IPMSG_FILE_DIR; pixbuf = dpixbuf; } else { filetype = _("unknown"); fileattr = 0; pixbuf = NULL; } /* 添加数据 */ gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, pixbuf, 1, tlist->data, 2, filesize, 3, filetype, 4, fileattr, -1); /* 释放资源 */ g_free(filesize); /* 转到下一个节点 */ tlist = g_slist_next(tlist); } /* 释放文件图标 */ if (rpixbuf) g_object_unref(rpixbuf); if (dpixbuf) g_object_unref(dpixbuf); } /** * 选择新的共享文件. * @param fileattr 文件类型 * @return 文件链表 */ GSList *ShareFile::PickSharedFile(uint32_t fileattr) { GtkWidget *dialog, *parent; GtkFileChooserAction action; const char *title; GSList *list; if (GET_MODE(fileattr) == IPMSG_FILE_REGULAR) { action = GTK_FILE_CHOOSER_ACTION_OPEN; title = _("Choose the files to share"); } else { action = GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER; title = _("Choose the folders to share"); } parent = GTK_WIDGET(g_datalist_get_data(&widset, "dialog-widget")); dialog = gtk_file_chooser_dialog_new(title, GTK_WINDOW(parent), action, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(dialog), FALSE); gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog), TRUE); gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), g_get_home_dir()); switch (gtk_dialog_run(GTK_DIALOG(dialog))) { case GTK_RESPONSE_ACCEPT: list = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(dialog)); break; case GTK_RESPONSE_CANCEL: default: list = NULL; break; } gtk_widget_destroy(dialog); return list; } /** * 增添常规文件. * @param sfile 共享文件类 */ void ShareFile::AddRegular(ShareFile *sfile) { GSList *list; list = sfile->PickSharedFile(IPMSG_FILE_REGULAR); sfile->AttachSharedFiles(list); g_slist_foreach(list, GFunc(g_free), NULL); g_slist_free(list); } /** * 增添目录文件. * @param sfile 共享文件类 */ void ShareFile::AddFolder(ShareFile *sfile) { GSList *list; list = sfile->PickSharedFile(IPMSG_FILE_DIR); sfile->AttachSharedFiles(list); g_slist_foreach(list, GFunc(g_free), NULL); g_slist_free(list); } /** * 删除被选中的共享文件. * @param widset widget set */ void ShareFile::DeleteFiles(GData **widset) { GtkWidget *widget; GtkTreeSelection *selection; GtkTreeModel *model; GtkTreeIter iter; widget = GTK_WIDGET(g_datalist_get_data(widset, "file-treeview-widget")); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget)); model = gtk_tree_view_get_model(GTK_TREE_VIEW(widget)); if (!gtk_tree_model_get_iter_first(model, &iter)) return; do { mark: if (gtk_tree_selection_iter_is_selected(selection, &iter)) { if (gtk_list_store_remove(GTK_LIST_STORE(model), &iter)) goto mark; break; } } while (gtk_tree_model_iter_next(model, &iter)); } void ShareFile::SetPassword(GData **widset) { GtkWidget *widget, *parent; char *passwd, *epasswd; parent = GTK_WIDGET(g_datalist_get_data(widset, "dialog-widget")); if (!(passwd = pop_password_settings(parent))) return; widget = GTK_WIDGET(g_datalist_get_data(widset, "password-button-widget")); epasswd = g_base64_encode((guchar *)passwd, strlen(passwd)); g_object_set_data_full(G_OBJECT(widget), "password", epasswd, GDestroyNotify(g_free)); g_free(passwd); } void ShareFile::ClearPassword(GData **widset) { GtkWidget *widget; widget = GTK_WIDGET(g_datalist_get_data(widset, "password-button-widget")); g_object_set_data(G_OBJECT(widget), "password", NULL); } /** * 接收拖拽文件信息. * @param sfile 共享文件类 * @param context the drag context * @param x where the drop happened * @param y where the drop happened * @param data the received data * @param info the info that has been registered with the target in the GtkTargetList * @param time the timestamp at which the data was received */ void ShareFile::DragDataReceived(ShareFile *sfile, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, guint info, guint time) { GSList *list; if (data->length <= 0 || data->format != 8) { gtk_drag_finish(context, FALSE, FALSE, time); return; } list = selection_data_get_path(data); sfile->AttachSharedFiles(list); g_slist_foreach(list, GFunc(g_free), NULL); g_slist_free(list); gtk_drag_finish(context, TRUE, FALSE, time); } /** * 文件树(file-tree)排序比较函数. * @param model network-model * @param a A GtkTreeIter in model * @param b Another GtkTreeIter in model * @return 比较值 */ gint ShareFile::FileTreeCompareFunc(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b) { gchar *afilepath, *bfilepath; uint32_t afileattr, bfileattr; gint result; gtk_tree_model_get(model, a, 1, &afilepath, 4, &afileattr, -1); gtk_tree_model_get(model, b, 1, &bfilepath, 4, &bfileattr, -1); if (GET_MODE(afileattr) == GET_MODE(bfileattr)) result = strcmp(afilepath, bfilepath); else if (GET_MODE(afileattr) == IPMSG_FILE_REGULAR) result = 1; else result = -1; g_free(afilepath); g_free(bfilepath); return result; } iptux-0.6.3/src/ShareFile.h000077500000000000000000000030261257720006400155020ustar00rootroot00000000000000// // C++ Interface: ShareFile // // Description: // 添加或删除共享文件,即管理共享文件 // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef SHAREFILE_H #define SHAREFILE_H #include "mess.h" class ShareFile { public: ShareFile(); ~ShareFile(); static void ShareEntry(GtkWidget *parent); private: void InitSublayer(); void ClearSublayer(); GtkWidget *CreateMainDialog(GtkWidget *parent); GtkWidget *CreateAllArea(); GtkTreeModel *CreateFileModel(); void FillFileModel(GtkTreeModel *model); GtkWidget *CreateFileTree(GtkTreeModel *model); void ApplySharedData(); void AttachSharedFiles(GSList *list); GSList *PickSharedFile(uint32_t fileattr); GData *widset; GData *mdlset; //回调处理部分 private: static void AddRegular(ShareFile *sfile); static void AddFolder(ShareFile *sfile); static void DeleteFiles(GData **widset); static void SetPassword(GData **widset); static void ClearPassword(GData **widset); static void DragDataReceived(ShareFile *sfile, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, guint info, guint time); static gint FileTreeCompareFunc(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b); }; #endif iptux-0.6.3/src/SoundSystem.cpp000077500000000000000000000126631257720006400164770ustar00rootroot00000000000000// // C++ Implementation: SoundSystem // // Description: // // // Author: Jally , (C) 2009 // // Copyright: See COPYING file that comes with this distribution // // #include "SoundSystem.h" #ifdef HAVE_GST #include "ProgramData.h" #include "output.h" #include "utils.h" extern ProgramData progdt; /** * 类构造函数. */ SoundSystem::SoundSystem():eltset(NULL), persist(false) { g_datalist_init(&eltset); gettimeofday(×tamp, NULL); } /** * 类析构函数. */ SoundSystem::~SoundSystem() { GstElement *pipeline; if ( (pipeline = GST_ELEMENT(g_datalist_get_data(&eltset, "pipeline-element")))) gst_element_set_state(pipeline, GST_STATE_NULL); g_datalist_clear(&eltset); } /** * 初始化声音系统. */ void SoundSystem::InitSublayer() { GstElement *pipeline; GstElement *filesrc, *decode, *volume, *convert, *sink; GstBus *bus; gst_init(NULL, NULL); pipeline = gst_pipeline_new("sound-system"); g_datalist_set_data_full(&eltset, "pipeline-element", pipeline, GDestroyNotify(gst_object_unref)); filesrc = gst_element_factory_make("filesrc", "source"); g_datalist_set_data(&eltset, "filesrc-element", filesrc); decode = gst_element_factory_make("decodebin", "decode"); g_datalist_set_data(&eltset, "decode-element", decode); volume = gst_element_factory_make("volume", "volume"); g_datalist_set_data(&eltset, "volume-element", volume); convert = gst_element_factory_make("audioconvert", "convert"); g_datalist_set_data(&eltset, "convert-element", convert); sink = gst_element_factory_make("autoaudiosink", "output"); g_datalist_set_data(&eltset, "output-element", sink); gst_bin_add_many(GST_BIN(pipeline), filesrc, decode, volume, convert, sink, NULL); gst_element_link_many(filesrc, decode, NULL); gst_element_link_many(volume, convert, sink, NULL); g_signal_connect_swapped(decode, "pad-added", G_CALLBACK(LinkElement), &eltset); bus = gst_pipeline_get_bus(GST_PIPELINE(pipeline)); gst_bus_add_signal_watch(GST_BUS(bus)); g_signal_connect_swapped(bus, "message::error", G_CALLBACK(ErrorMessageOccur), this); g_signal_connect_swapped(bus, "message::eos", G_CALLBACK(EosMessageOccur), this); gst_object_unref(bus); g_object_set(volume, "volume", progdt.volume, NULL); } /** * 调整音量. * @param value 音量值 */ void SoundSystem::AdjustVolume(double value) { GstElement *volume; volume = GST_ELEMENT(g_datalist_get_data(&eltset, "volume-element")); g_object_set(volume, "volume", value, NULL); } /** * 播放音频文件. * @param file 音频文件 * @note 如果时间间隔过短,系统将会忽略后一个请求. */ void SoundSystem::Playing(const char *file) { GstElement *pipeline, *filesrc; struct timeval time; gettimeofday(&time, NULL); if (!FLAG_ISSET(progdt.sndfgs, 0) || (difftimeval(time, timestamp) < 0.1)) return; if (persist) EosMessageOccur(this); persist = true; filesrc = GST_ELEMENT(g_datalist_get_data(&eltset, "filesrc-element")); g_object_set(filesrc, "location", file, NULL); pipeline = GST_ELEMENT(g_datalist_get_data(&eltset, "pipeline-element")); gst_element_set_state(pipeline, GST_STATE_PLAYING); timestamp = time; } /** * 停止播放. */ void SoundSystem::Stop() { EosMessageOccur(this); } /** * 链接元素. */ void SoundSystem::LinkElement(GData **eltset, GstPad *pad) { GstElement *volume; GstCaps *caps; GstStructure *str; GstPad *spad; caps = gst_pad_query_caps(pad, NULL); str = gst_caps_get_structure(caps, 0); volume = GST_ELEMENT(g_datalist_get_data(eltset, "volume-element")); if(strcasestr(gst_structure_get_name(str), "audio") &&(spad = gst_element_get_compatible_pad(volume, pad, caps))) gst_pad_link(pad, spad); gst_caps_unref(caps); } /** * 错误响应处理函数. */ void SoundSystem::ErrorMessageOccur(SoundSystem *sndsys, GstMessage *message) { GstElement *pipeline; GError *error; gst_message_parse_error(message, &error, NULL); pwarning(_("Failed to play the prompt tone, %s\n"), error->message); g_error_free(error); EosMessageOccur(sndsys); pipeline = GST_ELEMENT(g_datalist_get_data(&sndsys->eltset, "pipeline-element")); gst_element_set_state(pipeline, GST_STATE_NULL); } /** * 播放文件结束响应处理函数. */ void SoundSystem::EosMessageOccur(SoundSystem *sndsys) { GstElement *pipeline, *decode, *volume; pipeline = GST_ELEMENT(g_datalist_get_data(&sndsys->eltset, "pipeline-element")); gst_element_set_state(pipeline, GST_STATE_READY); decode = GST_ELEMENT(g_datalist_get_data(&sndsys->eltset, "decode-element")); volume = GST_ELEMENT(g_datalist_get_data(&sndsys->eltset, "volume-element")); gst_element_unlink(decode, volume); sndsys->persist = false; } #else SoundSystem::SoundSystem() {} SoundSystem::~SoundSystem() {} void SoundSystem::InitSublayer() {} void SoundSystem::AdjustVolume(double value) {} void SoundSystem::Playing(const char *file) {} void SoundSystem::Stop() {} #endif iptux-0.6.3/src/SoundSystem.h000077500000000000000000000015341257720006400161370ustar00rootroot00000000000000// // C++ Interface: SoundSystem // // Description: // 声音系统 // // Author: Jally , (C) 2009 // // Copyright: See COPYING file that comes with this distribution // // #ifndef SOUNDSYSTEM_H #define SOUNDSYSTEM_H #include "mess.h" class SoundSystem { public: SoundSystem(); ~SoundSystem(); void InitSublayer(); void AdjustVolume(double value); void Playing(const char *file); void Stop(); #ifdef HAVE_GST private: GData *eltset; //元素集 struct timeval timestamp; //时间戳 bool persist; //声音系统占用标记 private: static void LinkElement(GData **eltset, GstPad *pad); static void ErrorMessageOccur(SoundSystem *sndsys, GstMessage *message); static void EosMessageOccur(SoundSystem *sndsys); #endif }; #endif iptux-0.6.3/src/StatusIcon.cpp000077500000000000000000000237121257720006400162730ustar00rootroot00000000000000// // C++ Implementation: StatusIcon // // Description: // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #include "StatusIcon.h" #include "ProgramData.h" #include "CoreThread.h" #include "MainWindow.h" #include "DialogPeer.h" #include "DialogGroup.h" #include "DataSettings.h" #include "ShareFile.h" #include "DetectPal.h" #include "callback.h" #include "support.h" #include "utils.h" extern ProgramData progdt; extern CoreThread cthrd; extern MainWindow mwin; /** * 类构造函数. */ StatusIcon::StatusIcon():statusicon(NULL), timerid(0) { } /** * 类析构函数. */ StatusIcon::~StatusIcon() { if (statusicon) g_object_unref(statusicon); if (timerid > 0) g_source_remove(timerid); } /** * 创建状态图标. */ void StatusIcon::CreateStatusIcon() { GdkScreen *screen; if (FLAG_ISSET(progdt.flags, 6)) { statusicon = gtk_status_icon_new_from_stock("iptux-logo-hide"); g_object_set_data(G_OBJECT(statusicon), "show", GINT_TO_POINTER(FALSE)); } else { statusicon = gtk_status_icon_new_from_stock("iptux-logo-show"); g_object_set_data(G_OBJECT(statusicon), "show", GINT_TO_POINTER(TRUE)); } screen = gdk_screen_get_default(); gtk_status_icon_set_screen(statusicon, screen); g_signal_connect(statusicon, "activate", G_CALLBACK(StatusIconActivate), NULL); g_signal_connect(statusicon, "popup-menu", G_CALLBACK(PopupWorkMenu), NULL); #if GTK_CHECK_VERSION(2,16,0) g_object_set(statusicon, "has-tooltip", TRUE, NULL); g_signal_connect(statusicon, "query-tooltip", G_CALLBACK(StatusIconQueryTooltip), NULL); #endif timerid = gdk_threads_add_timeout(1000, GSourceFunc(UpdateUI), this); } /** * 更改状态图标的表现形式. */ void StatusIcon::AlterStatusIconMode() { if (g_object_get_data(G_OBJECT(statusicon), "show")) { gtk_status_icon_set_from_stock(statusicon, "iptux-logo-hide"); g_object_set_data(G_OBJECT(statusicon), "show", GINT_TO_POINTER(FALSE)); } else { gtk_status_icon_set_from_stock(statusicon, "iptux-logo-show"); g_object_set_data(G_OBJECT(statusicon), "show", GINT_TO_POINTER(TRUE)); } } /** * 更新与状态图标相关的UI. * @param sicon 状态图标类 * @return GLib库所需 */ gboolean StatusIcon::UpdateUI(StatusIcon *sicon) { #if !(GTK_CHECK_VERSION(2,16,0)) char *msgstr, *prestr; guint len; /* 获取消息串 */ pthread_mutex_lock(cthrd.GetMutex()); if ( (len = cthrd.GetMsglineItems())) { gtk_status_icon_set_blinking(sicon->statusicon, TRUE); msgstr = g_strdup_printf(_("To be read: %u messages"), len); } else { gtk_status_icon_set_blinking(sicon->statusicon, FALSE); msgstr = get_sys_host_addr_string(cthrd.UdpSockQuote()); msgstr = msgstr ? msgstr : g_strdup(_("iptux")); } pthread_mutex_unlock(cthrd.GetMutex()); /* 在必要的条件下更改消息串 */ prestr = (char *)g_object_get_data(G_OBJECT(sicon->statusicon), "tooltip-text"); if (!prestr || strcmp(prestr, msgstr) != 0) { gtk_status_icon_set_tooltip(sicon->statusicon, msgstr); g_object_set_data_full(G_OBJECT(sicon->statusicon), "tooltip-text", msgstr, GDestroyNotify(g_free)); } else g_free(msgstr); #else pthread_mutex_lock(cthrd.GetMutex()); if (cthrd.GetMsglineHeadItem()) gtk_status_icon_set_blinking(sicon->statusicon, TRUE); else gtk_status_icon_set_blinking(sicon->statusicon, FALSE); pthread_mutex_unlock(cthrd.GetMutex()); #endif return TRUE; } /** * 创建弹出菜单. * @return 菜单 */ GtkWidget *StatusIcon::CreatePopupMenu(GtkStatusIcon *statusicon) { GtkWidget *menu, *menuitem; GtkWidget *image, *window; window = mwin.ObtainWindow(); menu = gtk_menu_new(); /* 显示&隐藏面板 */ if (g_object_get_data(G_OBJECT(statusicon), "show")) menuitem = gtk_image_menu_item_new_with_mnemonic(_("_Hide")); else menuitem = gtk_image_menu_item_new_with_mnemonic(_("_Show")); image = gtk_image_new_from_icon_name("menu-board", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect(menuitem, "activate", G_CALLBACK(alter_interface_mode), NULL); menuitem = gtk_separator_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); /* 显示文件传输窗口 */ NO_OPERATION_C menuitem = gtk_image_menu_item_new_with_mnemonic(_("_Transmission")); image = gtk_image_new_from_stock(GTK_STOCK_CONNECT, GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect(menuitem, "activate", G_CALLBACK(ShowTransWindow), NULL); /* 首选项 */ NO_OPERATION_C menuitem = gtk_image_menu_item_new_with_mnemonic(_("_Preferences")); image = gtk_image_new_from_stock(GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(DataSettings::ResetDataEntry), window); /* 共享文件管理 */ NO_OPERATION_C menuitem = gtk_image_menu_item_new_with_mnemonic(_("_Shared Management")); image = gtk_image_new_from_icon_name("menu-share", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(ShareFile::ShareEntry), window); menuitem = gtk_separator_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); /* 探测好友 */ NO_OPERATION_C menuitem = gtk_image_menu_item_new_with_mnemonic(_("_Detect")); image = gtk_image_new_from_icon_name("menu-detect", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect_swapped(menuitem, "activate", G_CALLBACK(DetectPal::DetectEntry), window); /* 程序退出 */ NO_OPERATION_C menuitem = gtk_image_menu_item_new_with_mnemonic(_("_Quit")); image = gtk_image_new_from_stock(GTK_STOCK_QUIT, GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); g_signal_connect(menuitem, "activate", G_CALLBACK(iptux_gui_quit), NULL); return menu; } /** * 显示文件传输窗口. */ void StatusIcon::ShowTransWindow() { mwin.OpenTransWindow(); } /** * 状态图标被激活的响应处理函数. */ void StatusIcon::StatusIconActivate() { GroupInfo *grpinf; pthread_mutex_lock(cthrd.GetMutex()); if (cthrd.GetMsglineItems()) grpinf = cthrd.GetMsglineHeadItem(); else grpinf = NULL; pthread_mutex_unlock(cthrd.GetMutex()); if (grpinf) { switch (grpinf->type) { case GROUP_BELONG_TYPE_REGULAR: DialogPeer::PeerDialogEntry(grpinf); break; case GROUP_BELONG_TYPE_SEGMENT: case GROUP_BELONG_TYPE_GROUP: case GROUP_BELONG_TYPE_BROADCAST: DialogGroup::GroupDialogEntry(grpinf); break; default: break; } } else alter_interface_mode(); } /** * 弹出菜单. * @param statusicon the object which received the signal * @param button the button that was pressed * @param time the timestamp of the event that triggered the signal emission */ void StatusIcon::PopupWorkMenu(GtkStatusIcon *statusicon, guint button, guint time) { GtkWidget *menu; menu = CreatePopupMenu(statusicon); gtk_widget_show_all(menu); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, button, time); } /** * 状态图标信息提示查询请求. * @param statusicon the object which received the signal * @param x the x coordinate of the cursor position * @param y the y coordinate of the cursor position * @param key TRUE if the tooltip was trigged using the keyboard * @param tooltip a GtkTooltip * @return Gtk+库所需 */ gboolean StatusIcon::StatusIconQueryTooltip(GtkStatusIcon *statusicon, gint x, gint y, gboolean key, GtkTooltip *tooltip) { char *msgstr; guint len; /* 获取消息串 */ pthread_mutex_lock(cthrd.GetMutex()); if ( (len = cthrd.GetMsglineItems())) { msgstr = g_strdup_printf(_("To be read: %u messages"), len); } else { msgstr = get_sys_host_addr_string(cthrd.UdpSockQuote()); msgstr = msgstr ? msgstr : g_strdup(_("iptux")); } pthread_mutex_unlock(cthrd.GetMutex()); /* 设置信息提示串 */ gtk_tooltip_set_text(tooltip, msgstr); g_free(msgstr); return TRUE; } /** * 状态图标是否嵌入到状态栏. * @return 是否已嵌入 */ gboolean StatusIcon::IsEmbedded() { embedded = gtk_status_icon_is_embedded(statusicon); return embedded; } iptux-0.6.3/src/StatusIcon.h000077500000000000000000000020051257720006400157300ustar00rootroot00000000000000// // C++ Interface: StatusIcon // // Description: // 创建状态栏图标 // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef STATUSICON_H #define STATUSICON_H #include "mess.h" class StatusIcon { public: StatusIcon(); ~StatusIcon(); void CreateStatusIcon(); gboolean IsEmbedded(); void AlterStatusIconMode(); private: GtkStatusIcon *statusicon; guint timerid; gboolean embedded; private: static gboolean UpdateUI(StatusIcon *sicon); static GtkWidget *CreatePopupMenu(GtkStatusIcon *statusicon); //回调处理部分 private: static void ShowTransWindow(); static void StatusIconActivate(); static void PopupWorkMenu(GtkStatusIcon *statusicon, guint button, guint time); static gboolean StatusIconQueryTooltip(GtkStatusIcon *statusicon, gint x, gint y, gboolean key, GtkTooltip *tooltip); }; #endif iptux-0.6.3/src/TcpData.cpp000077500000000000000000000133421257720006400155150ustar00rootroot00000000000000// // C++ Implementation: TcpData // // Description: // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #include "TcpData.h" #include "CoreThread.h" #include "MainWindow.h" #include "SendFile.h" #include "wrapper.h" #include "utils.h" extern CoreThread cthrd; extern MainWindow mwin; /** * 类构造函数. */ TcpData::TcpData():sock(-1), size(0) { } /** * 类析构函数. */ TcpData::~TcpData() { close(sock); } /** * TCP连接处理入口. * @param sock tcp socket */ void TcpData::TcpDataEntry(int sock) { TcpData tdata; tdata.sock = sock; tdata.DispatchTcpData(); } /** * 分派TCP数据处理方案. */ void TcpData::DispatchTcpData() { uint32_t commandno; ssize_t len; /* 读取消息前缀 */ if ((len = read_ipmsg_prefix(sock, buf, MAX_SOCKLEN)) <= 0) return; /* 分派消息 */ size = len; //设置缓冲区数据的有效长度 commandno = iptux_get_dec_number(buf, ':', 4); //获取命令字 switch (GET_MODE(commandno)) { case IPMSG_GETFILEDATA: RequestData(IPMSG_FILE_REGULAR); break; case IPMSG_GETDIRFILES: RequestData(IPMSG_FILE_DIR); break; case IPTUX_SENDSUBLAYER: RecvSublayer(GET_OPT(commandno)); break; default: break; } } /** * 请求文件(目录)数据. * @param fileattr 文件类型 */ void TcpData::RequestData(uint32_t fileattr) { SendFile sfile; const char *attachptr; char *attach; attachptr = iptux_skip_section(buf, ':', 5); switch (GET_MODE(fileattr)) { case IPMSG_FILE_REGULAR: read_ipmsg_filedata(sock, (void *)attachptr, buf + MAX_SOCKLEN - attachptr, buf + size - attachptr); break; case IPMSG_FILE_DIR: read_ipmsg_dirfiles(sock, (void *)attachptr, buf + MAX_SOCKLEN - attachptr, buf + size - attachptr); break; default: break; } attach = ipmsg_get_attach(buf, ':', 5); sfile.RequestDataEntry(sock, fileattr, attach); g_free(attach); } /** * 接收底层数据. * @param cmdopt 命令字选项 */ void TcpData::RecvSublayer(uint32_t cmdopt) { static uint32_t count = 0; char path[MAX_PATHLEN]; struct sockaddr_in addr; socklen_t len; PalInfo *pal; int fd; /* 检查好友是否存在 */ len = sizeof(addr); getpeername(sock, (struct sockaddr *)&addr, &len); if (!(pal = cthrd.GetPalFromList(addr.sin_addr.s_addr))) return; /* 创建即将接收的数据文件路径 */ switch (GET_OPT(cmdopt)) { case IPTUX_PHOTOPICOPT: snprintf(path, MAX_PATHLEN, "%s" PHOTO_PATH "/%" PRIx32, g_get_user_cache_dir(), pal->ipv4); break; case IPTUX_MSGPICOPT: snprintf(path, MAX_PATHLEN, "%s" PIC_PATH "/%" PRIx32 "-%" PRIx32 "-%lx", g_get_user_cache_dir(), pal->ipv4, count++, time(NULL)); break; default: snprintf(path, MAX_PATHLEN, "%s" IPTUX_PATH "/%" PRIx32 "-%" PRIx32 "-%lx", g_get_user_cache_dir(), pal->ipv4, count++, time(NULL)); break; } /* 终于可以接收数据了^_^ */ if ((fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644)) == -1) return; RecvSublayerData(fd, strlen(buf) + 1); close(fd); /* 分派数据 */ switch (GET_OPT(cmdopt)) { case IPTUX_PHOTOPICOPT: RecvPhotoPic(pal, path); break; case IPTUX_MSGPICOPT: RecvMsgPic(pal, path); break; default: break; } } /** * 接收数据. * @param fd file descriptor * @param len 缓冲区无效数据长度 */ void TcpData::RecvSublayerData(int fd, size_t len) { ssize_t ssize; if (size != len) xwrite(fd, buf + len, size - len); do { if ((ssize = xread(sock, buf, MAX_SOCKLEN)) <= 0) break; if ((ssize = xwrite(fd, buf, ssize)) <= 0) break; } while (1); } /** * 接收好友形象照片. * @param pal class PalInfo * @param path file path */ void TcpData::RecvPhotoPic(PalInfo *pal, const char *path) { g_free(pal->photo); pal->photo = g_strdup(path); gdk_threads_enter(); pthread_mutex_lock(cthrd.GetMutex()); cthrd.UpdatePalToList(pal->ipv4); pthread_mutex_unlock(cthrd.GetMutex()); mwin.UpdateItemToPaltree(pal->ipv4); gdk_threads_leave(); } /** * 接收消息图片. * @param pal class PalInfo * @param path file path */ void TcpData::RecvMsgPic(PalInfo *pal, const char *path) { MsgPara para; ChipData *chip; /* 构建消息封装包 */ para.pal = pal; para.stype = MESSAGE_SOURCE_TYPE_PAL; para.btype = GROUP_BELONG_TYPE_REGULAR; chip = new ChipData; chip->type = MESSAGE_CONTENT_TYPE_PICTURE; chip->data = g_strdup(path); para.dtlist = g_slist_append(NULL, chip); /* 交给某人处理吧 */ cthrd.InsertMessage(¶); } iptux-0.6.3/src/TcpData.h000077500000000000000000000014571257720006400151660ustar00rootroot00000000000000// // C++ Interface: TcpData // // Description: // 对TCP连接进行处理 // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef TCPDATA_H #define TCPDATA_H #include "mess.h" class TcpData { public: TcpData(); ~TcpData(); static void TcpDataEntry(int sock); private: void DispatchTcpData(); void RequestData(uint32_t fileattr); void RecvSublayer(uint32_t cmdopt); void RecvSublayerData(int fd, size_t len); void RecvPhotoPic(PalInfo *pal, const char *path); void RecvMsgPic(PalInfo *pal, const char *path); int sock; //数据交流套接口 size_t size; //缓冲区已使用长度 char buf[MAX_SOCKLEN]; //缓冲区 }; #endif iptux-0.6.3/src/UdpData.cpp000077500000000000000000000650561257720006400155300ustar00rootroot00000000000000// // C++ Implementation: UdpData // // Description: // // // Author: cwll ,(C)2012 // Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // 2012.02 在接收消息中去掉了群组模式,群组模式只用来发消息 // #include "UdpData.h" #include "ProgramData.h" #include "CoreThread.h" #include "MainWindow.h" #include "DialogPeer.h" #include "DialogGroup.h" #include "SoundSystem.h" #include "Command.h" #include "RecvFile.h" #include "SendFile.h" #include "wrapper.h" #include "dialog.h" #include "utils.h" extern ProgramData progdt; extern CoreThread cthrd; extern MainWindow mwin; extern SoundSystem sndsys; /** * 类构造函数. */ UdpData::UdpData():ipv4(0), size(0), encode(NULL) { } /** * 类析构函数. */ UdpData::~UdpData() { g_free(encode); } /** * UDP数据解析入口. * @param ipv4 ipv4 * @param buf[] 数据缓冲区 * @param size 数据有效长度 */ void UdpData::UdpDataEntry(in_addr_t ipv4, const char buf[], size_t size) { UdpData udata; udata.ipv4 = ipv4; udata.size = size < MAX_UDPLEN ? size : MAX_UDPLEN; memcpy(udata.buf, buf, size); if (size != MAX_UDPLEN) udata.buf[size] = '\0'; udata.DispatchUdpData(); } /** * 分派UDP数据到相应的函数去进行处理. */ void UdpData::DispatchUdpData() { uint32_t commandno; /* 如果开启了黑名单处理功能,且此地址正好被列入了黑名单 */ /* 嘿嘿,那就不要怪偶心狠手辣了 */ if (FLAG_ISSET(progdt.flags, 1) && cthrd.BlacklistContainItem(ipv4)) return; /* 决定消息去向 */ commandno = iptux_get_dec_number(buf, ':', 4); switch (GET_MODE(commandno)) { case IPMSG_BR_ENTRY: SomeoneEntry(); break; case IPMSG_BR_EXIT: SomeoneExit(); break; case IPMSG_ANSENTRY: SomeoneAnsentry(); break; case IPMSG_BR_ABSENCE: SomeoneAbsence(); break; case IPMSG_SENDMSG: SomeoneSendmsg(); break; case IPMSG_RECVMSG: SomeoneRecvmsg(); break; case IPTUX_ASKSHARED: SomeoneAskShared(); break; case IPTUX_SENDICON: SomeoneSendIcon(); break; case IPTUX_SENDSIGN: SomeoneSendSign(); break; case IPTUX_SENDMSG: SomeoneBcstmsg(); break; default: break; } } /** * 好友信息数据丢失默认处理函数. * 若xx并不在好友列表中,但是程序却期望能够接受xx的本次会话, * 所以必须以默认数据构建好友信息数据并插入好友列表 \n */ void UdpData::SomeoneLost() { PalInfo *pal; /* 创建好友数据 */ pal = new PalInfo; pal->ipv4 = ipv4; pal->segdes = progdt.FindNetSegDescription(ipv4); if (!(pal->version = iptux_get_section_string(buf, ':', 0))) pal->version = g_strdup("?"); if (!(pal->user = iptux_get_section_string(buf, ':', 2))) pal->user = g_strdup("???"); if (!(pal->host = iptux_get_section_string(buf, ':', 3))) pal->host = g_strdup("???"); pal->name = g_strdup(_("mysterious")); pal->group = g_strdup(_("mysterious")); pal->photo = NULL; pal->sign = NULL; pal->iconfile = g_strdup(progdt.palicon); pal->encode = g_strdup(encode ? encode : "utf-8"); FLAG_SET(pal->flags, 1); pal->packetn = 0; pal->rpacketn = 0; /* 加入好友列表 */ gdk_threads_enter(); pthread_mutex_lock(cthrd.GetMutex()); cthrd.AttachPalToList(pal); pthread_mutex_unlock(cthrd.GetMutex()); mwin.AttachItemToPaltree(ipv4); gdk_threads_leave(); } /** * 好友上线. */ void UdpData::SomeoneEntry() { Command cmd; pthread_t pid; PalInfo *pal; /* 转换缓冲区数据编码 */ ConvertEncode(progdt.encode); /* 加入或更新好友列表 */ gdk_threads_enter(); pthread_mutex_lock(cthrd.GetMutex()); if ( (pal = cthrd.GetPalFromList(ipv4))) { UpdatePalInfo(pal); cthrd.UpdatePalToList(ipv4); } else { pal = CreatePalInfo(); cthrd.AttachPalToList(pal); } pthread_mutex_unlock(cthrd.GetMutex()); if (mwin.PaltreeContainItem(ipv4)) mwin.UpdateItemToPaltree(ipv4); else mwin.AttachItemToPaltree(ipv4); gdk_threads_leave(); /* 通知好友本大爷在线 */ cmd.SendAnsentry(cthrd.UdpSockQuote(), pal); if (FLAG_ISSET(pal->flags, 0)) { pthread_create(&pid, NULL, ThreadFunc(CoreThread::SendFeatureData), pal); pthread_detach(pid); } } /** * 好友退出. */ void UdpData::SomeoneExit() { PalInfo *pal; /* 从好友链表中删除 */ gdk_threads_enter(); if (mwin.PaltreeContainItem(ipv4)) mwin.DelItemFromPaltree(ipv4); pthread_mutex_lock(cthrd.GetMutex()); if ( (pal = cthrd.GetPalFromList(ipv4))) { cthrd.DelPalFromList(ipv4); FLAG_CLR(pal->flags, 1); } pthread_mutex_unlock(cthrd.GetMutex()); gdk_threads_leave(); } /** * 好友在线. */ void UdpData::SomeoneAnsentry() { Command cmd; pthread_t pid; PalInfo *pal; const char *ptr; /* 若好友不兼容iptux协议,则需转码 */ ptr = iptux_skip_string(buf, size, 3); if (!ptr || *ptr == '\0') ConvertEncode(progdt.encode); /* 加入或更新好友列表 */ gdk_threads_enter(); pthread_mutex_lock(cthrd.GetMutex()); if ( (pal = cthrd.GetPalFromList(ipv4))) { UpdatePalInfo(pal); cthrd.UpdatePalToList(ipv4); } else { pal = CreatePalInfo(); cthrd.AttachPalToList(pal); } pthread_mutex_unlock(cthrd.GetMutex()); if (mwin.PaltreeContainItem(ipv4)) mwin.UpdateItemToPaltree(ipv4); else mwin.AttachItemToPaltree(ipv4); gdk_threads_leave(); /* 更新本大爷的数据信息 */ if (FLAG_ISSET(pal->flags, 0)) { pthread_create(&pid, NULL, ThreadFunc(CoreThread::SendFeatureData), pal); pthread_detach(pid); } else if (strcasecmp(progdt.encode, pal->encode) != 0) cmd.SendAnsentry(cthrd.UdpSockQuote(), pal); } /** * 好友更改个人信息. */ void UdpData::SomeoneAbsence() { PalInfo *pal; const char *ptr; /* 若好友不兼容iptux协议,则需转码 */ pal = cthrd.GetPalFromList(ipv4); //利用好友链表只增不减的特性,无须加锁 ptr = iptux_skip_string(buf, size, 3); if (!ptr || *ptr == '\0') ConvertEncode(pal ? pal->encode : progdt.encode); /* 加入或更新好友列表 */ gdk_threads_enter(); pthread_mutex_lock(cthrd.GetMutex()); if (pal) { UpdatePalInfo(pal); cthrd.UpdatePalToList(ipv4); } else { pal = CreatePalInfo(); cthrd.AttachPalToList(pal); } pthread_mutex_unlock(cthrd.GetMutex()); if (mwin.PaltreeContainItem(ipv4)) mwin.UpdateItemToPaltree(ipv4); else mwin.AttachItemToPaltree(ipv4); gdk_threads_leave(); } /** * 好友发送消息. * */ void UdpData::SomeoneSendmsg() { GroupInfo *grpinf; PalInfo *pal; Command cmd; uint32_t commandno, packetno; char *text; pthread_t pid; DialogPeer *dlgpr; GtkWidget *window; /* 如果对方兼容iptux协议,则无须再转换编码 */ pal = cthrd.GetPalFromList(ipv4); if (!pal || !FLAG_ISSET(pal->flags, 0)) ConvertEncode(pal ? pal->encode : progdt.encode); /* 确保好友在线,并对编码作出适当调整 */ pal = AssertPalOnline(); if (strcasecmp(pal->encode, encode ? encode : "utf-8") != 0) { g_free(pal->encode); pal->encode = g_strdup(encode ? encode : "utf-8"); } /* 回复好友并检查此消息是否过时 */ commandno = iptux_get_dec_number(buf, ':', 4); packetno = iptux_get_dec_number(buf, ':', 1); if (commandno & IPMSG_SENDCHECKOPT) cmd.SendReply(cthrd.UdpSockQuote(), pal, packetno); if (packetno <= pal->packetn) return; pal->packetn = packetno; /* 插入消息&在消息队列中注册 */ text = ipmsg_get_attach(buf, ':', 5); if (text && *text != '\0') { /*/* 插入消息 */ // if ((commandno & IPMSG_BROADCASTOPT) || (commandno & IPMSG_MULTICASTOPT)) // InsertMessage(pal, GROUP_BELONG_TYPE_BROADCAST, text); // else InsertMessage(pal, GROUP_BELONG_TYPE_REGULAR, text); } g_free(text); /*/* 注册消息 */ pthread_mutex_lock(cthrd.GetMutex()); // if ((commandno & IPMSG_BROADCASTOPT) || (commandno & IPMSG_MULTICASTOPT)) // grpinf = cthrd.GetPalBroadcastItem(pal); // else grpinf = cthrd.GetPalRegularItem(pal); if (!grpinf->dialog && !cthrd.MsglineContainItem(grpinf)) cthrd.PushItemToMsgline(grpinf); pthread_mutex_unlock(cthrd.GetMutex()); /* 标记位处理 先处理底层数据,后面显示窗口*/ if (commandno & IPMSG_FILEATTACHOPT) { if ((commandno & IPTUX_SHAREDOPT) && (commandno & IPTUX_PASSWDOPT)) { pthread_create(&pid, NULL, ThreadFunc(ThreadAskSharedPasswd), pal); pthread_detach(pid); } else RecvPalFile(); } window = GTK_WIDGET(grpinf->dialog); //这里不知道为什么运行时一直会提示window不是object dlgpr = (DialogPeer *)(g_object_get_data(G_OBJECT(window),"dialog")); if(grpinf->dialog) dlgpr->ShowDialogPeer(dlgpr); /* 是否直接弹出聊天窗口 */ if (FLAG_ISSET(progdt.flags, 7)) { gdk_threads_enter(); if (!(grpinf->dialog)) { // switch (grpinf->type) { // case GROUP_BELONG_TYPE_REGULAR: DialogPeer::PeerDialogEntry(grpinf); // break; // case GROUP_BELONG_TYPE_SEGMENT: // case GROUP_BELONG_TYPE_GROUP: // case GROUP_BELONG_TYPE_BROADCAST: // DialogGroup::GroupDialogEntry(grpinf); // default: // break; // } } else { gtk_window_present(GTK_WINDOW(grpinf->dialog)); } gdk_threads_leave(); } /* 播放提示音 */ if (FLAG_ISSET(progdt.sndfgs, 1)) sndsys.Playing(progdt.msgtip); } /** * 好友接收到消息. */ void UdpData::SomeoneRecvmsg() { uint32_t packetno; PalInfo *pal; if ( (pal = cthrd.GetPalFromList(ipv4))) { packetno = iptux_get_dec_number(buf, ':', 5); if (packetno == pal->rpacketn) pal->rpacketn = 0; //标记此包编号已经被回复 } } /** * 好友请求本计算机的共享文件. */ void UdpData::SomeoneAskShared() { Command cmd; pthread_t pid; PalInfo *pal; const char *limit; char *passwd; if (!(pal = cthrd.GetPalFromList(ipv4))) return; limit = cthrd.GetAccessPublicLimit(); if (!limit || *limit == '\0') { pthread_create(&pid, NULL, ThreadFunc(ThreadAskSharedFile), pal); pthread_detach(pid); } else if (!(iptux_get_dec_number(buf, ':', 4) & IPTUX_PASSWDOPT)) { cmd.SendFileInfo(cthrd.UdpSockQuote(), pal, IPTUX_SHAREDOPT | IPTUX_PASSWDOPT, ""); } else if ( (passwd = ipmsg_get_attach(buf, ':', 5))) { if (strcmp(passwd, limit) == 0) { pthread_create(&pid, NULL, ThreadFunc(ThreadAskSharedFile), pal); pthread_detach(pid); } g_free(passwd); } } /** * 好友发送头像数据. */ void UdpData::SomeoneSendIcon() { PalInfo *pal; char *iconfile; if (!(pal = cthrd.GetPalFromList(ipv4)) || FLAG_ISSET(pal->flags, 2)) return; /* 接收并更新数据 */ if ( (iconfile = RecvPalIcon())) { g_free(pal->iconfile); pal->iconfile = iconfile; gdk_threads_enter(); pthread_mutex_lock(cthrd.GetMutex()); cthrd.UpdatePalToList(ipv4); pthread_mutex_unlock(cthrd.GetMutex()); mwin.UpdateItemToPaltree(ipv4); gdk_threads_leave(); } } /** * 好友发送个性签名. */ void UdpData::SomeoneSendSign() { PalInfo *pal; char *sign; if (!(pal = cthrd.GetPalFromList(ipv4))) return; /* 若好友不兼容iptux协议,则需转码 */ if (!FLAG_ISSET(pal->flags, 0)) ConvertEncode(pal->encode); /* 对编码作适当调整 */ if (strcasecmp(pal->encode, encode ? encode : "utf-8") != 0) { g_free(pal->encode); pal->encode = g_strdup(encode ? encode : "utf-8"); } /* 更新 */ if ( (sign = ipmsg_get_attach(buf, ':', 5))) { g_free(pal->sign); pal->sign = sign; gdk_threads_enter(); pthread_mutex_lock(cthrd.GetMutex()); cthrd.UpdatePalToList(ipv4); pthread_mutex_unlock(cthrd.GetMutex()); mwin.UpdateItemToPaltree(ipv4); gdk_threads_leave(); } } /** * 好友广播消息. */ void UdpData::SomeoneBcstmsg() { GroupInfo *grpinf; PalInfo *pal; uint32_t commandno, packetno; char *text; /* 如果对方兼容iptux协议,则无须再转换编码 */ pal = cthrd.GetPalFromList(ipv4); if (!pal || !FLAG_ISSET(pal->flags, 0)) ConvertEncode(pal ? pal->encode : progdt.encode); /* 确保好友在线,并对编码作出适当调整 */ pal = AssertPalOnline(); if (strcasecmp(pal->encode, encode ? encode : "utf-8") != 0) { g_free(pal->encode); pal->encode = g_strdup(encode ? encode : "utf-8"); } /* 检查此消息是否过时 */ packetno = iptux_get_dec_number(buf, ':', 1); if (packetno <= pal->packetn) return; pal->packetn = packetno; /* 插入消息&在消息队列中注册 */ text = ipmsg_get_attach(buf, ':', 5); if (text && *text != '\0') { commandno = iptux_get_dec_number(buf, ':', 4); /*/* 插入消息 */ switch (GET_OPT(commandno)) { case IPTUX_BROADCASTOPT: InsertMessage(pal, GROUP_BELONG_TYPE_BROADCAST, text); break; case IPTUX_GROUPOPT: InsertMessage(pal, GROUP_BELONG_TYPE_GROUP, text); break; case IPTUX_SEGMENTOPT: InsertMessage(pal, GROUP_BELONG_TYPE_SEGMENT, text); break; case IPTUX_REGULAROPT: default: InsertMessage(pal, GROUP_BELONG_TYPE_REGULAR, text); break; } /*/* 注册消息 */ pthread_mutex_lock(cthrd.GetMutex()); switch (GET_OPT(commandno)) { case IPTUX_BROADCASTOPT: grpinf = cthrd.GetPalBroadcastItem(pal); break; case IPTUX_GROUPOPT: grpinf = cthrd.GetPalGroupItem(pal); break; case IPTUX_SEGMENTOPT: grpinf = cthrd.GetPalSegmentItem(pal); break; case IPTUX_REGULAROPT: default: grpinf = cthrd.GetPalRegularItem(pal); break; } if (!grpinf->dialog && !cthrd.MsglineContainItem(grpinf)) cthrd.PushItemToMsgline(grpinf); pthread_mutex_unlock(cthrd.GetMutex()); } g_free(text); /* 播放提示音 */ if (FLAG_ISSET(progdt.sndfgs, 1)) sndsys.Playing(progdt.msgtip); } /** * 创建好友信息数据. * @return 好友数据 */ PalInfo *UdpData::CreatePalInfo() { PalInfo *pal; pal = new PalInfo; pal->ipv4 = ipv4; pal->segdes = progdt.FindNetSegDescription(ipv4); if (!(pal->version = iptux_get_section_string(buf, ':', 0))) pal->version = g_strdup("?"); if (!(pal->user = iptux_get_section_string(buf, ':', 2))) pal->user = g_strdup("???"); if (!(pal->host = iptux_get_section_string(buf, ':', 3))) pal->host = g_strdup("???"); if (!(pal->name = ipmsg_get_attach(buf, ':', 5))) pal->name = g_strdup(_("mysterious")); pal->group = GetPalGroup(); pal->photo = NULL; pal->sign = NULL; if (!(pal->iconfile = GetPalIcon())) pal->iconfile = g_strdup(progdt.palicon); if ( (pal->encode = GetPalEncode())) FLAG_SET(pal->flags, 0); else pal->encode = g_strdup(encode ? encode : "utf-8"); FLAG_SET(pal->flags, 1); pal->packetn = 0; pal->rpacketn = 0; return pal; } /** * 更新好友信息数据. * @param pal 好友数据 */ void UdpData::UpdatePalInfo(PalInfo *pal) { g_free(pal->segdes); pal->segdes = progdt.FindNetSegDescription(ipv4); g_free(pal->version); if (!(pal->version = iptux_get_section_string(buf, ':', 0))) pal->version = g_strdup("?"); g_free(pal->user); if (!(pal->user = iptux_get_section_string(buf, ':', 2))) pal->user = g_strdup("???"); g_free(pal->host); if (!(pal->host = iptux_get_section_string(buf, ':', 3))) pal->host = g_strdup("???"); if (!FLAG_ISSET(pal->flags, 2)) { g_free(pal->name); if (!(pal->name = ipmsg_get_attach(buf, ':', 5))) pal->name = g_strdup(_("mysterious")); g_free(pal->group); pal->group = GetPalGroup(); g_free(pal->iconfile); if (!(pal->iconfile = GetPalIcon())) pal->iconfile = g_strdup(progdt.palicon); FLAG_CLR(pal->flags, 0); g_free(pal->encode); if ( (pal->encode = GetPalEncode())) FLAG_SET(pal->flags, 0); else pal->encode = g_strdup(encode ? encode : "utf-8"); } FLAG_SET(pal->flags, 1); pal->packetn = 0; pal->rpacketn = 0; } /** * 插入消息. * @param pal class PalInfo * @param btype 消息所属类型 * @param msg 消息 */ void UdpData::InsertMessage(PalInfo *pal, GroupBelongType btype, const char *msg) { MsgPara para; ChipData *chip; /* 构建消息封装包 */ para.pal = pal; para.stype = MESSAGE_SOURCE_TYPE_PAL; para.btype = btype; chip = new ChipData; chip->type = MESSAGE_CONTENT_TYPE_STRING; chip->data = g_strdup(msg); para.dtlist = g_slist_append(NULL, chip); /* 交给某人处理吧 */ cthrd.InsertMessage(¶); } /** * 将缓冲区中的数据转换为utf8编码. * @param enc 原数据首选编码 */ void UdpData::ConvertEncode(const char *enc) { char *ptr; size_t len; /* 将缓冲区内有效的'\0'字符转换为ASCII字符 */ ptr = buf + strlen(buf) + 1; while ((size_t)(ptr - buf) <= size) { *(ptr - 1) = NULL_OBJECT; ptr += strlen(ptr) + 1; } /* 转换字符集编码 */ /** * @note 请不要采用以下做法,它在某些环境下将导致致命错误: \n * if (g_utf8_validate(buf, -1, NULL)) {encode = g_strdup("utf-8")} \n * e.g. 系统编码为GB18030的xx发送来纯ASCII字符串 \n */ if (enc && strcasecmp(enc, "utf-8") != 0 && (ptr = convert_encode(buf, "utf-8", enc))) encode = g_strdup(enc); else ptr = iptux_string_validate(buf, progdt.codeset, &encode); if (ptr) { len = strlen(ptr); size = len < MAX_UDPLEN ? len : MAX_UDPLEN; memcpy(buf, ptr, size); if (size < MAX_UDPLEN) buf[size] = '\0'; g_free(ptr); } /* 将缓冲区内的ASCII字符还原为'\0'字符 */ ptr = buf; while ( (ptr = (char *)memchr(ptr, NULL_OBJECT, buf + size - ptr))) { *ptr = '\0'; ptr++; } } /** * 获取好友群组名称. * @return 群组 */ char *UdpData::GetPalGroup() { const char *ptr; if ((ptr = iptux_skip_string(buf, size, 1)) && *ptr != '\0') return g_strdup(ptr); return NULL; } /** * 获取好友头像图标. * @return 头像 */ char *UdpData::GetPalIcon() { char path[MAX_PATHLEN]; const char *ptr; if ((ptr = iptux_skip_string(buf, size, 2)) && *ptr != '\0') { snprintf(path, MAX_PATHLEN, __PIXMAPS_PATH "/icon/%s", ptr); if (access(path, F_OK) == 0) return g_strdup(ptr); } return NULL; } /** * 获取好友系统编码. * @return 编码 */ char *UdpData::GetPalEncode() { const char *ptr; if ((ptr = iptux_skip_string(buf, size, 3)) && *ptr != '\0') return g_strdup(ptr); return NULL; } /** * 接收好友头像数据. * @return 头像文件名 */ char *UdpData::RecvPalIcon() { GdkPixbuf *pixbuf; char path[MAX_PATHLEN]; char *iconfile; size_t len; int fd; /* 若无头像数据则返回null */ if ((len = strlen(buf) + 1) >= size) return NULL; /* 将头像数据刷入磁盘 */ snprintf(path, MAX_PATHLEN, "%s" ICON_PATH "/%" PRIx32, g_get_user_cache_dir(), ipv4); if ((fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644)) == -1) return NULL; xwrite(fd, buf + len, size - len); close(fd); /* 将头像pixbuf加入内建 */ iconfile = NULL; gdk_threads_enter(); if ( (pixbuf = gdk_pixbuf_new_from_file(path, NULL))) { iconfile = g_strdup_printf("%" PRIx32, ipv4); gtk_icon_theme_add_builtin_icon(iconfile, MAX_ICONSIZE, pixbuf); g_object_unref(pixbuf); } gdk_threads_leave(); return iconfile; } /** * 确保好友一定在线. * @return 好友数据 */ PalInfo *UdpData::AssertPalOnline() { PalInfo *pal; if ( (pal = cthrd.GetPalFromList(ipv4))) { /* 既然好友不在线,那么他自然不在列表中 */ if (!FLAG_ISSET(pal->flags, 1)) { FLAG_SET(pal->flags, 1); gdk_threads_enter(); pthread_mutex_lock(cthrd.GetMutex()); cthrd.UpdatePalToList(ipv4); pthread_mutex_unlock(cthrd.GetMutex()); mwin.AttachItemToPaltree(ipv4); gdk_threads_leave(); } } else { SomeoneLost(); pal = cthrd.GetPalFromList(ipv4); } return pal; } /** * 接收好友文件信息. */ void UdpData::RecvPalFile() { uint32_t packetno, commandno; const char *ptr; pthread_t pid; GData *para; packetno = iptux_get_dec_number(buf, ':', 1); commandno = iptux_get_dec_number(buf, ':', 4); ptr = iptux_skip_string(buf, size, 1); /* 只有当此为共享文件信息或文件信息不为空才需要接收 */ if ((commandno & IPTUX_SHAREDOPT) || (ptr && *ptr != '\0')) { para = NULL; g_datalist_init(¶); g_datalist_set_data(¶, "palinfo", cthrd.GetPalFromList(ipv4)); g_datalist_set_data_full(¶, "extra-data", g_strdup(ptr), GDestroyNotify(g_free)); g_datalist_set_data(¶, "packetno", GUINT_TO_POINTER(packetno)); g_datalist_set_data(¶, "commandno", GUINT_TO_POINTER(commandno)); pthread_create(&pid, NULL, ThreadFunc(RecvFile::RecvEntry), para); pthread_detach(pid); } } /** * 请求获取好友共享文件的密码. * @param pal class PalInfo */ void UdpData::ThreadAskSharedPasswd(PalInfo *pal) { Command cmd; gchar *passwd, *epasswd; gdk_threads_enter(); passwd = pop_obtain_shared_passwd(pal); gdk_threads_leave(); if (passwd && *passwd != '\0') { epasswd = g_base64_encode((guchar *)passwd, strlen(passwd)); cmd.SendAskShared(cthrd.UdpSockQuote(), pal, IPTUX_PASSWDOPT, epasswd); g_free(epasswd); } g_free(passwd); } /** * 某好友请求本计算机的共享文件. * @param pal class PalInfo */ void UdpData::ThreadAskSharedFile(PalInfo *pal) { SendFile sfile; bool permit; if (FLAG_ISSET(progdt.flags, 0)) { gdk_threads_enter(); permit = pop_request_shared_file(pal); gdk_threads_leave(); if (permit) sfile.SendSharedInfoEntry(pal); } else sfile.SendSharedInfoEntry(pal); } iptux-0.6.3/src/UdpData.h000077500000000000000000000030171257720006400151620ustar00rootroot00000000000000// // C++ Interface: UdpData // // Description: // 处理接收到的UDP数据 // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef UDPDATA_H #define UDPDATA_H #include "mess.h" class UdpData { public: UdpData(); ~UdpData(); static void UdpDataEntry(in_addr_t ipv4, const char buf[], size_t size); private: void DispatchUdpData(); void SomeoneLost(); void SomeoneEntry(); void SomeoneExit(); void SomeoneAnsentry(); void SomeoneAbsence(); void SomeoneSendmsg(); void SomeoneRecvmsg(); void SomeoneAskShared(); void SomeoneSendIcon(); void SomeoneSendSign(); void SomeoneBcstmsg(); PalInfo *CreatePalInfo(); void UpdatePalInfo(PalInfo *pal); void InsertMessage(PalInfo *pal, GroupBelongType btype, const char *msg); void ConvertEncode(const char *enc); char *GetPalGroup(); char *GetPalIcon(); char *GetPalEncode(); char *RecvPalIcon(); PalInfo *AssertPalOnline(); void RecvPalFile(); in_addr_t ipv4; //数据来自 size_t size; //缓冲区数据有效长度 char buf[MAX_UDPLEN]; //数据缓冲区 char *encode; //原数据编码(NULL意味着utf8) private: static void ThreadAskSharedPasswd(PalInfo *pal); static void ThreadAskSharedFile(PalInfo *pal); }; #endif iptux-0.6.3/src/callback.cpp000077500000000000000000000253331257720006400157340ustar00rootroot00000000000000// // C++ Implementation: callback // // Description: // // // Author: Jally , (C) 2009 // // Copyright: See COPYING file that comes with this distribution // // #include "callback.h" #include "ProgramData.h" #include "StatusIcon.h" #include "MainWindow.h" #include "support.h" extern ProgramData progdt; extern StatusIcon sicon; extern MainWindow mwin; /** * 改变UI的外观. * @return Gtk+库所需 */ gboolean alter_interface_mode() { sicon.AlterStatusIconMode(); if(sicon.IsEmbedded()) mwin.AlterWindowMode(); else gtk_main_quit(); return TRUE; } /** * 给entry控件设置提示信息. * @param entry entry * @param x the x coordinate of the cursor position * @param y the y coordinate of the cursor position * @param key TRUE if the tooltip was trigged using the keyboard * @param tooltip a GtkTooltip * @param text text string * @return Gtk+库所需 */ gboolean entry_query_tooltip(GtkWidget *entry, gint x, gint y, gboolean key, GtkTooltip *tooltip, char *text) { GtkWidget *label; label = gtk_label_new(text); gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); gtk_label_set_line_wrap_mode(GTK_LABEL(label), PANGO_WRAP_WORD_CHAR); gtk_tooltip_set_custom(tooltip, label); return TRUE; } /** * 保证entry控件只接收数字字符. * @param entry entry * @param text the new text to insert * @param length the length of the new text, in bytes, or -1 if new_text is nul-terminated */ void entry_insert_numeric(GtkWidget *entry, gchar *text, gint length) { gint count; if (length == -1) length = strlen(text); count = 0; while (count < length) { if (!isdigit(*(text + count)) && !(*(text + count) == '.')) { g_signal_stop_emission_by_name(entry, "insert-text"); return; } count++; } } /** * 以可预览的方式选择文件. * @param title file chooser dialog title * @param parent parent * @return 文件名 */ gchar *choose_file_with_preview(const gchar *title, GtkWidget *parent) { GtkWidget *chooser, *preview; gchar *filename; chooser = gtk_file_chooser_dialog_new(title, GTK_WINDOW(parent), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); gtk_dialog_set_default_response(GTK_DIALOG(chooser), GTK_RESPONSE_ACCEPT); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(chooser), TRUE); gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(chooser), FALSE); gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(chooser), TRUE); gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(chooser), g_get_home_dir()); preview = gtk_image_new(); gtk_widget_set_size_request(preview, MAX_PREVIEWSIZE, MAX_PREVIEWSIZE); gtk_file_chooser_set_preview_widget(GTK_FILE_CHOOSER(chooser), preview); gtk_file_chooser_set_preview_widget_active(GTK_FILE_CHOOSER(chooser), FALSE); g_signal_connect(chooser, "update-preview", G_CALLBACK(chooser_update_preview), preview); gtk_widget_show_all(chooser); filename = NULL; switch (gtk_dialog_run(GTK_DIALOG(chooser))) { case GTK_RESPONSE_ACCEPT: filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(chooser)); break; default: break; } gtk_widget_destroy(chooser); return filename; } /** * 更新文件选择器的预览控件. * @param chooser a file chooser * @param preview preview widget */ void chooser_update_preview(GtkFileChooser *chooser, GtkWidget *preview) { gchar *filename; GdkPixbuf *pixbuf; if (!(filename = gtk_file_chooser_get_preview_filename(chooser))) { gtk_file_chooser_set_preview_widget_active(chooser, FALSE); return; } pixbuf = gdk_pixbuf_new_from_file(filename, NULL); g_free(filename); if (!pixbuf) { gtk_file_chooser_set_preview_widget_active(chooser, FALSE); return; } pixbuf_shrink_scale_1(&pixbuf, MAX_PREVIEWSIZE, MAX_PREVIEWSIZE); gtk_image_set_from_pixbuf(GTK_IMAGE(preview), pixbuf); g_object_unref(pixbuf); gtk_file_chooser_set_preview_widget_active(chooser, TRUE); } void model_select_all(GtkTreeModel *model) { GtkTreeIter iter; if (!gtk_tree_model_get_iter_first(model, &iter)) return; do { if (gtk_tree_model_get_flags(model) & GTK_TREE_MODEL_LIST_ONLY) gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, TRUE, -1); else gtk_tree_store_set(GTK_TREE_STORE(model), &iter, 0, TRUE, -1); } while (gtk_tree_model_iter_next(model, &iter)); } void model_turn_all(GtkTreeModel *model) { GtkTreeIter iter; gboolean active; if (!gtk_tree_model_get_iter_first(model, &iter)) return; do { gtk_tree_model_get(model, &iter, 0, &active, -1); if (gtk_tree_model_get_flags(model) & GTK_TREE_MODEL_LIST_ONLY) gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, !active, -1); else gtk_tree_store_set(GTK_TREE_STORE(model), &iter, 0, !active, -1); } while (gtk_tree_model_iter_next(model, &iter)); } void model_clear_all(GtkTreeModel *model) { GtkTreeIter iter; if (!gtk_tree_model_get_iter_first(model, &iter)) return; do { if (gtk_tree_model_get_flags(model) & GTK_TREE_MODEL_LIST_ONLY) gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, FALSE, -1); else gtk_tree_store_set(GTK_TREE_STORE(model), &iter, 0, FALSE, -1); } while (gtk_tree_model_iter_next(model, &iter)); } void model_turn_select(GtkTreeModel *model, gchar *path) { GtkTreeIter iter; gboolean active; if (!gtk_tree_model_get_iter_from_string(model, &iter, path)) return; gtk_tree_model_get(model, &iter, 0, &active, -1); if (gtk_tree_model_get_flags(model) & GTK_TREE_MODEL_LIST_ONLY) gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, !active, -1); else gtk_tree_store_set(GTK_TREE_STORE(model), &iter, 0, !active, -1); } void textview_follow_if_link(GtkWidget *textview, GtkTextIter *iter) { GSList *tags, *tmp; GtkTextTag *tag; gchar *url; tmp = tags = gtk_text_iter_get_tags(iter); while (tmp) { tag = (GtkTextTag *)tmp->data; if ( (url = (gchar *)g_object_get_data(G_OBJECT(tag), "url"))) { #if GTK_CHECK_VERSION(2,14,0) if (!gtk_show_uri(NULL, url, GDK_CURRENT_TIME, NULL)) #endif iptux_open_url(url); break; } tmp = tmp->next; } g_slist_free(tags); } void textview_set_cursor_if_appropriate(GtkTextView *textview, gint x, gint y) { GdkWindow *window; GSList *tags, *tmp; GtkTextTag *tag; GtkTextIter iter; gboolean hovering; hovering = FALSE; gtk_text_view_get_iter_at_location(textview, &iter, x, y); tmp = tags = gtk_text_iter_get_tags(&iter); while (tmp) { tag = (GtkTextTag *)tmp->data; if (g_object_get_data(G_OBJECT(tag), "url")) { hovering = TRUE; break; } tmp = tmp->next; } g_slist_free(tags); if (hovering != GPOINTER_TO_INT( g_object_get_data(G_OBJECT(textview), "hovering-over-link"))) { window = gtk_text_view_get_window(textview, GTK_TEXT_WINDOW_TEXT); if (hovering) gdk_window_set_cursor(window, progdt.lcursor); else gdk_window_set_cursor(window, progdt.xcursor); g_object_set_data(G_OBJECT(textview), "hovering-over-link", GINT_TO_POINTER(hovering)); } } gboolean textview_key_press_event(GtkWidget *textview, GdkEventKey *event) { GtkTextBuffer *buffer; GtkTextIter iter; gint position; switch (event->keyval) { case GDK_Return: case GDK_KP_Enter: buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview)); g_object_get(buffer, "cursor-position", &position, NULL); gtk_text_buffer_get_iter_at_offset(buffer, &iter, position); textview_follow_if_link(textview, &iter); break; default: break; } return FALSE; } void textview_event_after(GtkWidget *textview, GdkEvent *ev) { GtkTextBuffer *buffer; GdkEventButton *event; GtkTextIter iter; gboolean selected; gint x, y; if (ev->type != GDK_BUTTON_RELEASE) return; event = (GdkEventButton *)ev; if (event->button != 1) return; /* we shouldn't follow a link if the user has selected something */ buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview)); g_object_get(buffer, "has-selection", &selected, NULL); if (selected) return; gtk_text_view_window_to_buffer_coords(GTK_TEXT_VIEW(textview), GTK_TEXT_WINDOW_WIDGET, event->x, event->y, &x, &y); gtk_text_view_get_iter_at_location(GTK_TEXT_VIEW(textview), &iter, x, y); textview_follow_if_link(textview, &iter); } gboolean textview_motion_notify_event(GtkWidget *textview, GdkEventMotion *event) { gint x, y; gtk_text_view_window_to_buffer_coords(GTK_TEXT_VIEW(textview), GTK_TEXT_WINDOW_WIDGET, event->x, event->y, &x, &y); textview_set_cursor_if_appropriate(GTK_TEXT_VIEW(textview), x, y); gdk_window_get_pointer(textview->window, NULL, NULL, NULL); return FALSE; } gboolean textview_visibility_notify_event(GtkWidget *textview, GdkEventVisibility *event) { gint wx, wy, bx, by; gdk_window_get_pointer(textview->window, &wx, &wy, NULL); gtk_text_view_window_to_buffer_coords(GTK_TEXT_VIEW(textview), GTK_TEXT_WINDOW_WIDGET, wx, wy, &bx, &by); textview_set_cursor_if_appropriate(GTK_TEXT_VIEW(textview), bx, by); return FALSE; } iptux-0.6.3/src/callback.h000077500000000000000000000026221257720006400153750ustar00rootroot00000000000000// // C++ Interface: callback // // Description: // 共用构建界面函数及回调函数集合 // // Author: Jally , (C) 2009 // // Copyright: See COPYING file that comes with this distribution // // #ifndef CALLBACK_H #define CALLBACK_H #include "mess.h" /* interface mode */ gboolean alter_interface_mode(); /* entry */ gboolean entry_query_tooltip(GtkWidget *entry, gint x, gint y, gboolean key, GtkTooltip *tooltip, char *text); void entry_insert_numeric(GtkWidget *entry, gchar *text, gint length); /* file-chooser */ gchar *choose_file_with_preview(const gchar *title, GtkWidget *parent); void chooser_update_preview(GtkFileChooser *chooser, GtkWidget *preview); /* model:0 G_TYPE_BOOLEAN */ void model_select_all(GtkTreeModel *model); void model_turn_all(GtkTreeModel *model); void model_clear_all(GtkTreeModel *model); void model_turn_select(GtkTreeModel *model, gchar *path); /* text view link */ void textview_follow_if_link(GtkWidget *textview, GtkTextIter *iter); void textview_set_cursor_if_appropriate(GtkTextView *textview, gint x, gint y); gboolean textview_key_press_event(GtkWidget *textview, GdkEventKey *event); void textview_event_after(GtkWidget *textview, GdkEvent *ev); gboolean textview_motion_notify_event(GtkWidget *textview, GdkEventMotion *event); gboolean textview_visibility_notify_event(GtkWidget *textview, GdkEventVisibility *event); #endif iptux-0.6.3/src/deplib.h000077500000000000000000000014041257720006400150750ustar00rootroot00000000000000// // C++ Interface: deplib // // Description: // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef DEPLIB_H #define DEPLIB_H #ifdef HAVE_CONFIG_H # include #endif #ifdef HAVE_GST #include #endif #include #include #undef _ #include #include #define ATOM_OBJECT 0xFFFC #define OCCUPY_OBJECT 0x01 #define NULL_OBJECT 0x02 #define GINT(x) ((gint)(x)) #define GCONF_PATH "/apps/iptux" #define IPTUX_PATH "/iptux" #define LOG_PATH "/iptux/log" #define PIC_PATH "/iptux/pic" #define ICON_PATH "/iptux/icon" #define PHOTO_PATH "/iptux/photo" #ifndef _ #define _(string) gettext(string) #endif #endif iptux-0.6.3/src/dialog.cpp000077500000000000000000000223031257720006400154310ustar00rootroot00000000000000// // C++ Implementation: dialog // // Description: // // // Author: Jally , (C) 2009 // // Copyright: See COPYING file that comes with this distribution // // #include "dialog.h" #include "MainWindow.h" #include "ProgramData.h" #include "callback.h" #include "output.h" extern MainWindow mwin; extern ProgramData progdt; /** * 弹出请求程序退出的对话框. * @return true|false */ bool pop_request_quit() { GtkWidget *dialog; gint result; dialog = gtk_message_dialog_new(GTK_WINDOW(mwin.ObtainWindow()), GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, "%s", _("File transfer has not been completed.\n" "Are you sure to cancel and quit?")); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_CANCEL); gtk_window_set_title(GTK_WINDOW(dialog), _("Confirm Exit")); result = gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); return (result == GTK_RESPONSE_OK); } /** * 弹出好友请求获取本机共享文件的对话框. * @param pal class PalInfo * @return true|false */ bool pop_request_shared_file(PalInfo *pal) { GtkWidget *dialog, *box; GtkWidget *label, *image; char ipstr[INET_ADDRSTRLEN], *ptr; gint result; dialog = gtk_dialog_new_with_buttons(_("Request Shared Resources"), GTK_WINDOW(mwin.ObtainWindow()), GTK_DIALOG_MODAL, _("Agree"), GTK_RESPONSE_ACCEPT, _("Refuse"), GTK_RESPONSE_CANCEL, NULL); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT); gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); box = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), box, TRUE, TRUE, 0); image = gtk_image_new_from_stock(GTK_STOCK_DIALOG_QUESTION, GTK_ICON_SIZE_DIALOG); gtk_box_pack_start(GTK_BOX(box), image, FALSE, FALSE, 0); image = gtk_vseparator_new(); gtk_box_pack_start(GTK_BOX(box), image, FALSE, FALSE, 0); inet_ntop(AF_INET, &pal->ipv4, ipstr, INET_ADDRSTRLEN); ptr = g_strdup_printf(_("Your pal (%s)[%s]\n" "is requesting to get your shared resources,\n" "Do you agree?"), pal->name, ipstr); label = gtk_label_new(ptr); g_free(ptr); gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); gtk_label_set_line_wrap_mode(GTK_LABEL(label), PANGO_WRAP_WORD_CHAR); gtk_box_pack_start(GTK_BOX(box), label, TRUE, TRUE, 4); gtk_widget_show_all(dialog); result = gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); return (result == GTK_RESPONSE_ACCEPT); } /** * 弹出请求获取好友共享文件的密码. * @param pal class PalInfo * @return password string */ char *pop_obtain_shared_passwd(PalInfo *pal) { GtkWidget *dialog, *frame, *box; GtkWidget *image, *passwd; char ipstr[INET_ADDRSTRLEN], *text; gint result; dialog = gtk_dialog_new_with_buttons(_("Access Password"), GTK_WINDOW(mwin.ObtainWindow()), GTK_DIALOG_MODAL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK); gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); frame = gtk_frame_new(_("Please input the password for " "the shared files behind")); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_ETCHED_IN); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), frame, FALSE, FALSE, 0); box = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(frame), box); image = gtk_image_new_from_stock(GTK_STOCK_DIALOG_AUTHENTICATION, GTK_ICON_SIZE_DIALOG); gtk_box_pack_start(GTK_BOX(box), image, FALSE, FALSE, 0); image = gtk_vseparator_new(); gtk_box_pack_start(GTK_BOX(box), image, FALSE, FALSE, 0); inet_ntop(AF_INET, &pal->ipv4, ipstr, INET_ADDRSTRLEN); text = g_strdup_printf(_("(%s)[%s]Password:"), pal->name, ipstr); frame = gtk_frame_new(text); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_NONE); gtk_box_pack_start(GTK_BOX(box), frame, TRUE, TRUE, 0); g_free(text); passwd = gtk_entry_new(); gtk_entry_set_activates_default(GTK_ENTRY(passwd), TRUE); gtk_entry_set_visibility(GTK_ENTRY(passwd), FALSE); gtk_container_add(GTK_CONTAINER(frame), passwd); gtk_widget_show_all(dialog); text = NULL; //并无多大用处,主要用来避免编译警告 mark: switch (result = gtk_dialog_run(GTK_DIALOG(dialog))) { case GTK_RESPONSE_OK: if (*(text = gtk_editable_get_chars(GTK_EDITABLE(passwd), 0, -1)) == '\0') { gtk_widget_grab_focus(passwd); pop_warning(dialog, _("\nEmpty Password!")); g_free(text); goto mark; } default: break; } gtk_widget_destroy(dialog); return (result == GTK_RESPONSE_OK ? text : NULL); } /** * 弹出密码设定的对话框. * @param parent parent window * @return password string */ char *pop_password_settings(GtkWidget *parent) { GtkWidget *dialog, *hbox, *passwd, *repeat; gchar *text1, *text2; gint result; dialog = gtk_dialog_new_with_buttons(_("Enter a New Password"), GTK_WINDOW(parent), GTK_DIALOG_MODAL, GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK); gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), hbox, FALSE, FALSE, 0); passwd = gtk_label_new(_("Password: ")); gtk_box_pack_start(GTK_BOX(hbox), passwd, FALSE, FALSE, 0); passwd = gtk_entry_new(); gtk_entry_set_activates_default(GTK_ENTRY(passwd), TRUE); gtk_entry_set_visibility(GTK_ENTRY(passwd), FALSE); gtk_box_pack_start(GTK_BOX(hbox), passwd, TRUE, TRUE, 0); hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), hbox, FALSE, FALSE, 0); repeat = gtk_label_new(_("Repeat: ")); gtk_box_pack_start(GTK_BOX(hbox), repeat, FALSE, FALSE, 0); repeat = gtk_entry_new(); gtk_entry_set_visibility(GTK_ENTRY(repeat), FALSE); gtk_box_pack_start(GTK_BOX(hbox), repeat, TRUE, TRUE, 0); gtk_widget_show_all(dialog); text1 = text2 = NULL; //并无多大用处,主要用来避免编译警告 mark: switch (result = gtk_dialog_run(GTK_DIALOG(dialog))) { case GTK_RESPONSE_OK: text1 = gtk_editable_get_chars(GTK_EDITABLE(passwd), 0, -1); text2 = gtk_editable_get_chars(GTK_EDITABLE(repeat), 0, -1); gtk_widget_grab_focus(passwd); if (strcmp(text1, text2) != 0) { pop_warning(dialog, _("\nPassword Mismatched!")); g_free(text1); g_free(text2); goto mark; } else if (*text1 == '\0') { pop_warning(dialog, _("\nEmpty Password!")); g_free(text1); g_free(text2); goto mark; } default: break; } gtk_widget_destroy(dialog); if (result == GTK_RESPONSE_OK) { g_free(text1); return text2; } return NULL; } /** * 弹出接收文件存放位置的对话框. * @param parent parent window * @return path string */ char *pop_save_path(GtkWidget *parent) { char *path; GtkWidget *dialog; dialog = gtk_file_chooser_dialog_new (_("Please select a folder to save files."), GTK_WINDOW(parent), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER (dialog),progdt.path); path = progdt.path; if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { path = gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER (dialog)); } gtk_widget_destroy (dialog); return path; } iptux-0.6.3/src/dialog.h000077500000000000000000000007111257720006400150750ustar00rootroot00000000000000// // C++ Interface: dialog // // Description: // 常见对话框构建 // // Author: Jally , (C) 2009 // // Copyright: See COPYING file that comes with this distribution // // #ifndef DIALOG_H #define DIALOG_H #include "mess.h" bool pop_request_quit(); bool pop_request_shared_file(PalInfo *pal); char *pop_obtain_shared_passwd(PalInfo *pal); char *pop_password_settings(GtkWidget *parent); char *pop_save_path(GtkWidget *parent); #endif iptux-0.6.3/src/ipmsg.h000077500000000000000000000207161257720006400147640ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * 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. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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. */ #if !defined(IPMSG_H) #define IPMSG_H #define IPMSG_VERSION 0x001 #define IPMSG_PORT 0x979 /* command */ #define IPMSG_NOOPERATION 0x00000000UL #define IPMSG_BR_ENTRY 0x00000001UL #define IPMSG_BR_EXIT 0x00000002UL #define IPMSG_ANSENTRY 0x00000003UL #define IPMSG_BR_ABSENCE 0x00000004UL #define IPMSG_BR_ISGETLIST 0x00000010UL #define IPMSG_OKGETLIST 0x00000011UL #define IPMSG_GETLIST 0x00000012UL #define IPMSG_ANSLIST 0x00000013UL #define IPMSG_BR_ISGETLIST2 0x00000018UL #define IPMSG_SENDMSG 0x00000020UL #define IPMSG_RECVMSG 0x00000021UL #define IPMSG_READMSG 0x00000030UL #define IPMSG_DELMSG 0x00000031UL #define IPMSG_ANSREADMSG 0x00000032UL #define IPMSG_GETINFO 0x00000040UL #define IPMSG_SENDINFO 0x00000041UL #define IPMSG_GETABSENCEINFO 0x00000050UL #define IPMSG_SENDABSENCEINFO 0x00000051UL #define IPMSG_GETFILEDATA 0x00000060UL #define IPMSG_RELEASEFILES 0x00000061UL #define IPMSG_GETDIRFILES 0x00000062UL #define IPMSG_GETPUBKEY 0x00000072UL #define IPMSG_ANSPUBKEY 0x00000073UL /* option for all command */ #define IPMSG_ABSENCEOPT 0x00000100UL #define IPMSG_SERVEROPT 0x00000200UL #define IPMSG_DIALUPOPT 0x00010000UL #define IPMSG_FILEATTACHOPT 0x00200000UL #define IPMSG_ENCRYPTOPT 0x00400000UL #define IPMSG_UTF8OPT 0x00800000UL /* option for send command */ #define IPMSG_SENDCHECKOPT 0x00000100UL #define IPMSG_SECRETOPT 0x00000200UL #define IPMSG_BROADCASTOPT 0x00000400UL #define IPMSG_MULTICASTOPT 0x00000800UL #define IPMSG_NOPOPUPOPT 0x00001000UL #define IPMSG_AUTORETOPT 0x00002000UL #define IPMSG_RETRYOPT 0x00004000UL #define IPMSG_PASSWORDOPT 0x00008000UL #define IPMSG_NOLOGOPT 0x00020000UL #define IPMSG_NEWMUTIOPT 0x00040000UL #define IPMSG_NOADDLISTOPT 0x00080000UL #define IPMSG_READCHECKOPT 0x00100000UL #define IPMSG_SECRETEXOPT (IPMSG_READCHECKOPT|IPMSG_SECRETOPT) #define IPMSG_NO_REPLY_OPTS (IPMSG_BROADCASTOPT|IPMSG_AUTORETOPT) /* encryption flags for encrypt command */ #define IPMSG_RSA_512 0x00000001UL #define IPMSG_RSA_1024 0x00000002UL #define IPMSG_RSA_2048 0x00000004UL #define IPMSG_RC2_40 0x00001000UL #define IPMSG_RC2_128 0x00004000UL #define IPMSG_RC2_256 0x00008000UL #define IPMSG_BLOWFISH_128 0x00020000UL #define IPMSG_BLOWFISH_256 0x00040000UL #define IPMSG_AES_128 0x00100000UL #define IPMSG_AES_192 0x00200000UL #define IPMSG_AES_256 0x00400000UL #define IPMSG_SIGN_STAMPOPT 0x01000000UL #define IPMSG_SIGN_MD5 0x10000000UL #define IPMSG_SIGN_SHA1 0x20000000UL /* compatibilty for Win beta version */ #define IPMSG_RC2_40OLD 0x00000010UL // for beta1-4 only #define IPMSG_RC2_128OLD 0x00000040UL // for beta1-4 only #define IPMSG_BLOWFISH_128OLD 0x00000400UL // for beta1-4 only #define IPMSG_RC2_40ALL (IPMSG_RC2_40|IPMSG_RC2_40OLD) #define IPMSG_RC2_128ALL (IPMSG_RC2_128|IPMSG_RC2_128OLD) #define IPMSG_BLOWFISH_128ALL (IPMSG_BLOWFISH_128|IPMSG_BLOWFISH_128OLD) /* file types for fileattach command */ #define IPMSG_FILE_REGULAR 0x00000001UL #define IPMSG_FILE_DIR 0x00000002UL #define IPMSG_FILE_RETPARENT 0x00000003UL // return parent directory #define IPMSG_FILE_SYMLINK 0x00000004UL #define IPMSG_FILE_CDEV 0x00000005UL // for UNIX #define IPMSG_FILE_BDEV 0x00000006UL // for UNIX #define IPMSG_FILE_FIFO 0x00000007UL // for UNIX #define IPMSG_FILE_RESFORK 0x00000010UL // for Mac /* file attribute options for fileattach command */ #define IPMSG_FILE_RONLYOPT 0x00000100UL #define IPMSG_FILE_HIDDENOPT 0x00001000UL #define IPMSG_FILE_EXHIDDENOPT 0x00002000UL // for MacOS X #define IPMSG_FILE_ARCHIVEOPT 0x00004000UL #define IPMSG_FILE_SYSTEMOPT 0x00008000UL /* extend attribute types for fileattach command */ #define IPMSG_FILE_UID 0x00000001UL #define IPMSG_FILE_USERNAME 0x00000002UL // uid by string #define IPMSG_FILE_GID 0x00000003UL #define IPMSG_FILE_GROUPNAME 0x00000004UL // gid by string #define IPMSG_FILE_PERM 0x00000010UL // for UNIX #define IPMSG_FILE_MAJORNO 0x00000011UL // for UNIX devfile #define IPMSG_FILE_MINORNO 0x00000012UL // for UNIX devfile #define IPMSG_FILE_CTIME 0x00000013UL // for UNIX #define IPMSG_FILE_MTIME 0x00000014UL #define IPMSG_FILE_ATIME 0x00000015UL #define IPMSG_FILE_CREATETIME 0x00000016UL #define IPMSG_FILE_CREATOR 0x00000020UL // for Mac #define IPMSG_FILE_FILETYPE 0x00000021UL // for Mac #define IPMSG_FILE_FINDERINFO 0x00000022UL // for Mac #define IPMSG_FILE_ACL 0x00000030UL #define IPMSG_FILE_ALIASFNAME 0x00000040UL // alias fname #define IPMSG_FILE_UNICODEFNAME 0x00000041UL // UNICODE fname #define FILELIST_SEPARATOR '\a' #define HOSTLIST_SEPARATOR '\a' #define HOSTLIST_DUMMY "\b" #define HLIST_ENTRY_SEPARATOR ':' #endif ///* @(#)Copyright (C) Jally 2008 iptux.h Version 0.4 */// #ifdef __IP_TUX__ /* macro */ #define GET_MODE(command) (command & 0x000000ffUL) #define GET_OPT(command) (command & 0xffffff00UL) /* header */ #define IPTUX_VERSION "1_iptux_0#5#2" #define IPTUX_DEFAULT_PORT IPMSG_PORT /* command */ #define IPTUX_ASKSHARED 0x000000FFUL #define IPTUX_SENDICON 0x000000FEUL #define IPTUX_SENDSUBLAYER 0x000000FDUL #define IPTUX_SENDSIGN 0x000000FCUL #define IPTUX_SENDMSG 0x000000FBUL /* option for IPTUX_SENDSUBLAYER */ #define IPTUX_PHOTOPICOPT 0x00000100UL #define IPTUX_MSGPICOPT 0x00000200UL /* option for IPMSG_SENDMSG */ #define IPTUX_SHAREDOPT 0x80000000UL /* option for IPMSG_SENDMSG & IPTUX_ASKSHARED */ #define IPTUX_PASSWDOPT 0x40000000UL /* option for IPTUX_SENDMSG */ #define IPTUX_REGULAROPT 0x00000100UL #define IPTUX_SEGMENTOPT 0x00000200UL #define IPTUX_GROUPOPT 0x00000300UL #define IPTUX_BROADCASTOPT 0x00000400UL /* data */ #define MAX_SOCKLEN 8192 #define MAX_UDPLEN 8192 #define MAX_BUFLEN 1024 #define MAX_PATHLEN 1024 #define MAX_SHAREDFILE 10000 #define MAX_ICONSIZE 30 #define MAX_PREVIEWSIZE 150 #define MAX_PHOTOSIZE 300 #define MAX_RETRYTIMES 4 #endif iptux-0.6.3/src/iptux.cpp000077500000000000000000000043221257720006400153440ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2008 by Jally * * jallyx@163.com * * * * 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 "ProgramData.h" #include "CoreThread.h" #include "StatusIcon.h" #include "MainWindow.h" #include "LogSystem.h" #include "SoundSystem.h" #include "support.h" ProgramData progdt; CoreThread cthrd; StatusIcon sicon; MainWindow mwin; LogSystem lgsys; SoundSystem sndsys; int main(int argc, char *argv[]) { setlocale(LC_ALL, ""); bindtextdomain(GETTEXT_PACKAGE, __LOCALE_PATH); bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); textdomain(GETTEXT_PACKAGE); analysis_parameter(argc, argv); if (!g_thread_supported()) g_thread_init(NULL); gdk_threads_init(); gdk_threads_enter(); gtk_init(&argc, &argv); iptux_init(); sicon.CreateStatusIcon(); mwin.CreateWindow(); cthrd.CoreThreadEntry(); gtk_main(); gdk_threads_leave(); return 0; } iptux-0.6.3/src/mess.cpp000066400000000000000000000034341257720006400151420ustar00rootroot00000000000000// // C++ Implementation: mess // // Description: // // // Author: Jally , (C) 2009 // // Copyright: See COPYING file that comes with this distribution // // #include "mess.h" #include "utils.h" PalInfo::PalInfo():ipv4(0), segdes(NULL), version(NULL), user(NULL), host(NULL), name(NULL), group(NULL), photo(NULL), sign(NULL), iconfile(NULL), encode(NULL), flags(0), packetn(0), rpacketn(0) {} PalInfo::~PalInfo() { g_free(segdes); g_free(version); g_free(user); g_free(host); g_free(name); g_free(group); g_free(photo); g_free(sign); g_free(iconfile); g_free(encode); } GroupInfo::GroupInfo():grpid(0), type(GROUP_BELONG_TYPE_REGULAR), name(NULL), member(NULL), buffer(NULL), dialog(NULL) {} GroupInfo::~GroupInfo() { g_free(name); g_slist_free(member); g_object_unref(buffer); } FileInfo::FileInfo():fileid(0), packetn(0), fileattr(0), filesize(-1), finishedsize(0),fileown(NULL), filepath(NULL) {} FileInfo::~FileInfo() { g_free(filepath); } MsgPara::MsgPara():pal(NULL), stype(MESSAGE_SOURCE_TYPE_PAL), btype(GROUP_BELONG_TYPE_REGULAR), dtlist(NULL) {} MsgPara::~MsgPara() { for (GSList *tlist = dtlist; tlist; tlist = g_slist_next(tlist)) delete (ChipData *)tlist->data; g_slist_free(dtlist); } ChipData::ChipData():type(MESSAGE_CONTENT_TYPE_STRING), data(NULL) {} ChipData::~ChipData() { g_free(data); } NetSegment::NetSegment():startip(NULL), endip(NULL), description(NULL) {} NetSegment::~NetSegment() { g_free(startip); g_free(endip); g_free(description); } SessionAbstract::SessionAbstract() {} SessionAbstract::~SessionAbstract() {} TransAbstract::TransAbstract() {} TransAbstract::~TransAbstract() {} iptux-0.6.3/src/mess.h000077500000000000000000000126021257720006400146070ustar00rootroot00000000000000// // C++ Interface: mess // // Description: // 很杂乱的一些数据基本结构. // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef UDT_H #define UDT_H #include "sys.h" #include "net.h" #include "deplib.h" #include "ipmsg.h" /***************偶是可爱的分割线(枚举变量)*****************/ /** * 消息来源类型. */ typedef enum { MESSAGE_SOURCE_TYPE_PAL, ///< 好友 MESSAGE_SOURCE_TYPE_SELF, ///< 自身 MESSAGE_SOURCE_TYPE_ERROR ///< 错误 }MessageSourceType; /** * 消息内容类型. */ typedef enum { MESSAGE_CONTENT_TYPE_STRING, ///< 字符串 MESSAGE_CONTENT_TYPE_PICTURE ///< 图片 }MessageContentType; /** * 群组所属类型 */ typedef enum { GROUP_BELONG_TYPE_REGULAR, ///< 常规 GROUP_BELONG_TYPE_SEGMENT, ///< 分段 GROUP_BELONG_TYPE_GROUP, ///< 分组 GROUP_BELONG_TYPE_BROADCAST ///< 广播 }GroupBelongType; /***************偶是可爱的分割线(数据对象)*****************/ /** * 好友信息. * flags位含义: \n * 黑名单(:3);此IP地址被列入黑名单(deprecated) \n * 更改(:2);好友的信息被用户手工修改,程序不应再更改好友的信息 \n * 在线(:1);好友依旧在线 \n * 兼容(:0);完全兼容iptux,程序将采用扩展协议与好友通信 \n */ class PalInfo { public: PalInfo(); ~PalInfo(); in_addr_t ipv4; ///< 好友IP char *segdes; ///< 所在网段描述 char *version; ///< 版本串 * char *user; ///< 好友用户 * char *host; ///< 好友主机 * char *name; ///< 昵称 * char *group; ///< 所在群组 char *photo; ///< 形象照片 char *sign; ///< 个性签名 char *iconfile; ///< 好友头像 * char *encode; ///< 好友编码 * uint8_t flags; ///< 3 黑名单:2 更改:1 在线:0 兼容 uint32_t packetn; ///< 已接受最大的包编号 uint32_t rpacketn; ///< 需要接受检查的包编号 }; /** * 群组信息. */ class GroupInfo { public: GroupInfo(); ~GroupInfo(); GQuark grpid; ///< 唯一标识 GroupBelongType type; ///< 群组类型 char *name; ///< 群组名称 * GSList *member; ///< 群组成员(数据不为本链表拥有) GtkTextBuffer *buffer; ///< 消息缓冲区 * GtkWidget *dialog; ///< 对话框(若存在则必须与对话框类关联) }; /** * 文件信息. */ class FileInfo { public: FileInfo(); ~FileInfo(); uint32_t fileid; ///< 唯一标识 uint32_t packetn; ///< 包编号 uint32_t fileattr; ///< 文件属性 int64_t filesize; ///< 文件大小 int64_t finishedsize; ///< 已完成大小 PalInfo *fileown; ///< 文件拥有者(来自好友*) char *filepath; ///< 文件路径 * uint32_t filectime; ///< 文件创建时间 uint32_t filemtime; ///< 文件最后修改时间 uint32_t filenum; ///< 包内编号 }; /** * 消息参数. */ class MsgPara { public: MsgPara(); ~MsgPara(); PalInfo *pal; ///< 好友数据信息(来自好友*) MessageSourceType stype; ///< 来源类型 GroupBelongType btype; ///< 所属类型 GSList *dtlist; ///< 数据链表 * }; /** * 碎片数据. */ class ChipData { public: ChipData(); ~ChipData(); MessageContentType type; ///< 消息内容类型 char *data; ///< 数据串 * }; /** * 网段数据. */ class NetSegment { public: NetSegment(); ~NetSegment(); char *startip; ///< IP起始地址 * char *endip; ///< IP终止地址 * char *description; ///< 此IP段描述 }; /***************偶是可爱的分割线(抽象类)*****************/ /** * 会话抽象类. * 提供好友会话类必需的公共接口. */ class SessionAbstract { public: SessionAbstract(); virtual ~SessionAbstract(); virtual void UpdatePalData(PalInfo *pal) = 0; ///< 更新好友数据 virtual void InsertPalData(PalInfo *pal) = 0; ///< 插入好友数据 virtual void DelPalData(PalInfo *pal) = 0; ///< 删除好友数据 virtual void ClearAllPalData() = 0; ///< 清除所有好友数据 // virtual void ShowEnclosure() = 0; ///< 显示附件 virtual void AttachEnclosure(const GSList *list) = 0; ///< 添加附件 virtual void OnNewMessageComing() = 0; ///< 窗口打开情况下有新消息 }; /** * 传输抽象类. * 提供文件传输类必需的公共接口. */ class TransAbstract { public: TransAbstract(); virtual ~TransAbstract(); /** * GData数据如下: \n * [GdkPixbuf]status, [gchar]task, [gchar]peer, [gchar]filename, [gchar]filelength, * [gchar]finishlength, [gint]progress, [gchar]pro-text, [gchar]cost, [gchar]remain, * [gchar]rate, [gpointer]data \n * @see MainWindow::CreateTransModel() */ virtual GData **GetTransFilePara() = 0; ///< 获取更新UI的数据 virtual void TerminateTrans() = 0; ///< 终止过程处理 }; #endif iptux-0.6.3/src/net.h000077500000000000000000000006111257720006400144230ustar00rootroot00000000000000// // C++ Interface: net // // Description: // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef NET_H #define NET_H #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #include #endif iptux-0.6.3/src/output.cpp000077500000000000000000000045201257720006400155330ustar00rootroot00000000000000// // C++ Implementation: output // // Description: // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #include "output.h" #include "sys.h" /** * 弹出消息提示. * @param parent parent window * @param format as in printf() * @param ... */ void pop_info(GtkWidget *parent, const gchar *format, ...) { GtkWidget *dialog; gchar *msg; va_list ap; va_start(ap, format); msg = g_strdup_vprintf(format, ap); va_end(ap); dialog = gtk_message_dialog_new(GTK_WINDOW(parent), GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, NULL); gtk_message_dialog_set_markup(GTK_MESSAGE_DIALOG(dialog), msg); g_free(msg); gtk_window_set_title(GTK_WINDOW(dialog), _("Infomation")); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); } /** * 弹出警告信息. * @param parent parent window * @param format as in printf() * @param ... */ void pop_warning(GtkWidget *parent, const gchar *format, ...) { GtkWidget *dialog; gchar *msg; va_list ap; va_start(ap, format); msg = g_strdup_vprintf(format, ap); va_end(ap); dialog = gtk_message_dialog_new(GTK_WINDOW(parent), GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, NULL); gtk_message_dialog_set_markup(GTK_MESSAGE_DIALOG(dialog), msg); g_free(msg); gtk_window_set_title(GTK_WINDOW(dialog), _("Warning")); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); } /** * 严重错误,程序将有可能自行强制退出. * @param format as in printf() * @param ... */ void pop_error(const gchar *format, ...) { GtkWidget *dialog; gchar *msg; va_list ap; va_start(ap, format); msg = g_strdup_vprintf(format, ap); va_end(ap); dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, NULL); gtk_message_dialog_set_markup(GTK_MESSAGE_DIALOG(dialog), msg); g_free(msg); gtk_window_set_title(GTK_WINDOW(dialog), _("Error")); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); } iptux-0.6.3/src/output.h000077500000000000000000000016521257720006400152030ustar00rootroot00000000000000// // C++ Interface: output // // Description: // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef OUTPUT_H #define OUTPUT_H #include "deplib.h" /* 警告信息输出 */ #ifndef WARNING #define pwarning(format,...) /*warnx(format,##__VA_ARGS__)*/ #else #define pwarning(format,...) warnx(format,##__VA_ARGS__) #endif /* 常规消息输出 */ #ifndef MESSAGE #define pmessage(format,...) /*printf(format,##__VA_ARGS__)*/ #else #define pmessage(format,...) printf(format,##__VA_ARGS__) #endif /* 程序执行踪迹输出,用于调试 */ #ifndef TRACE #define ptrace(format,...) /*printf(format,##__VA_ARGS__)*/ #else #define ptrace(format,...) printf(format,##__VA_ARGS__) #endif void pop_info(GtkWidget *parent, const gchar *format, ...); void pop_warning(GtkWidget *parent, const gchar *format, ...); void pop_error(const gchar *format, ...); #endif iptux-0.6.3/src/support.cpp000077500000000000000000000337411257720006400157160ustar00rootroot00000000000000// // C++ Implementation: support // // Description: // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #include "support.h" #include "ProgramData.h" #include "CoreThread.h" #include "MainWindow.h" #include "LogSystem.h" #include "SoundSystem.h" #include "dialog.h" #include "utils.h" #include "output.h" extern ProgramData progdt; extern CoreThread cthrd; extern MainWindow mwin; extern LogSystem lgsys; extern SoundSystem sndsys; /** * 程序必要初始化. */ void iptux_init() { bind_iptux_port(); init_iptux_environment(); progdt.InitSublayer(); lgsys.InitSublayer(); sndsys.InitSublayer(); signal(SIGPIPE, SIG_IGN); signal(SIGHUP, iptux_quit); signal(SIGINT, iptux_quit); signal(SIGQUIT, iptux_quit); signal(SIGTERM, iptux_quit); lgsys.SystemLog(_("Loading the process successfully!")); } /** * 程序GUI退出. */ void iptux_gui_quit() { if (mwin.TransmissionActive() && !pop_request_quit()) return; gtk_main_quit(); iptux_quit(0); } /** * 程序底层退出. */ void iptux_quit(int _ignore) { lgsys.SystemLog(_("The process is about to quit!")); exit(0); } /** * 程序参数分析. * @param argc 来自于主函数入口 * @param argv[] 来自于主函数入口 */ void analysis_parameter(int argc, char *const argv[]) { const struct option longopts[] = { {"help", 0, NULL, 'h'}, {"version", 0, NULL, 'v'}, {NULL, 0, NULL, 0} }; int opt; opterr = 0; while ((opt = getopt_long(argc, argv, "hv", longopts, NULL)) != -1) { switch (opt) { case 'h': print_usage(); exit(0); case 'v': print_version(); exit(0); default: print_stun(); exit(0); } } } /** * 打印用法. */ void print_usage() { printf(_("iptux: A software for sharing in LAN\n")); printf(_("\t-h --help\n\t\tdisplay this help and exit\n")); printf(_("\t-v --version\n\t\toutput version information and exit\n")); } /** * 打印版本号. */ void print_version() { printf("iptux: " VERSION "\n"); } /** * 打印.... */ void print_stun() { printf(_("What do you want to do?\n")); } /** * 打开URL. * @param url url */ void iptux_open_url(const char *url) { int fd; if (fork() != 0) return; /* 关闭由iptux打开的所有可能的文件描述符 */ fd = 3; while (fd < FD_SETSIZE) { close(fd); fd++; } /* 脱离终端控制 */ setsid(); /* 打开URL */ execlp("xdg-open", "xdg-open", url, NULL); /* 测试系统中所有可能被安装的浏览器 */ execlp("firefox", "firefox", url, NULL); execlp("opera", "opera", url, NULL); execlp("konqueror", "konqueror", url, NULL); pwarning(_("Can't find any available web browser!\n")); } /** * 绑定iptux程序的服务监听端口. */ void bind_iptux_port() { struct sockaddr_in addr; int tcpsock, udpsock; tcpsock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); socket_enable_reuse(tcpsock); udpsock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); socket_enable_reuse(udpsock); socket_enable_broadcast(udpsock); if ((tcpsock == -1) || (udpsock == -1)) { pop_error(_("Fatal Error!!\nFailed to create new socket!\n%s"), strerror(errno)); exit(1); } bzero(&addr, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(IPTUX_DEFAULT_PORT); addr.sin_addr.s_addr = htonl(INADDR_ANY); if (bind(tcpsock, (struct sockaddr *)&addr, sizeof(addr)) == -1 || bind(udpsock, (struct sockaddr *)&addr, sizeof(addr)) == -1) { close(tcpsock); close(udpsock); pop_error(_("Fatal Error!!\nFailed to bind the TCP/UDP port(2425)!\n%s"), strerror(errno)); exit(1); } cthrd.TcpSockQuote() = tcpsock; cthrd.UdpSockQuote() = udpsock; } /** * 初始化程序iptux的运行环境. * cache iptux {pic, photo, icon} \n * config iptux {log, photo, icon} \n */ void init_iptux_environment() { const char *env; char path[MAX_PATHLEN]; env = g_get_user_cache_dir(); if (access(env, F_OK) != 0) mkdir(env, 0777); snprintf(path, MAX_PATHLEN, "%s" IPTUX_PATH, env); if (access(path, F_OK) != 0) mkdir(path, 0777); snprintf(path, MAX_PATHLEN, "%s" PIC_PATH, env); if (access(path, F_OK) != 0) mkdir(path, 0777); snprintf(path, MAX_PATHLEN, "%s" PHOTO_PATH, env); if (access(path, F_OK) != 0) mkdir(path, 0777); snprintf(path, MAX_PATHLEN, "%s" ICON_PATH, env); if (access(path, F_OK) != 0) mkdir(path, 0777); snprintf(path, MAX_PATHLEN, "%s" LOG_PATH, env); if (access(path, F_OK) != 0) mkdir(path, 0777); env = g_get_user_config_dir(); if (access(env, F_OK) != 0) mkdir(env, 0777); snprintf(path, MAX_PATHLEN, "%s" IPTUX_PATH, env); if (access(path, F_OK) != 0) mkdir(path, 0777); snprintf(path, MAX_PATHLEN, "%s" LOG_PATH, env); if (access(path, F_OK) != 0) mkdir(path, 0777); snprintf(path, MAX_PATHLEN, "%s" PHOTO_PATH, env); if (access(path, F_OK) != 0) mkdir(path, 0777); snprintf(path, MAX_PATHLEN, "%s" ICON_PATH, env); if (access(path, F_OK) != 0) mkdir(path, 0777); snprintf(path, MAX_PATHLEN, "%s" LOG_PATH, env); if (access(path, F_OK) != 0) mkdir(path, 0777); } /** * 按照1:1的比例对图片做缩小(请注意,没有放大)处理. * @param pixbuf pixbuf * @param width width * @param height height * @note 原pixbuf将被本函数释放 */ void pixbuf_shrink_scale_1(GdkPixbuf **pixbuf, int width, int height) { gdouble scale_x, scale_y, scale; gint _width, _height; GdkPixbuf *tpixbuf; width = (width != -1) ? width : G_MAXINT; height = (height != -1) ? height : G_MAXINT; _width = gdk_pixbuf_get_width(*pixbuf); _height = gdk_pixbuf_get_height(*pixbuf); if (_width > width || _height > height) { scale = ((scale_x = (gdouble) width / _width) < (scale_y = (gdouble) height / _height)) ? scale_x : scale_y; _width = (gint) (_width * scale); _height = (gint) (_height * scale); tpixbuf = *pixbuf; *pixbuf = gdk_pixbuf_scale_simple(tpixbuf, _width, _height, GDK_INTERP_BILINEAR); g_object_unref(tpixbuf); } } /** * 获取库存图片. * @param stock_id a stock ID * @return pixbuf */ GdkPixbuf *obtain_pixbuf_from_stock(const gchar *stock_id) { GtkWidget *widget; GdkPixbuf *pixbuf; widget = gtk_window_new(GTK_WINDOW_TOPLEVEL); pixbuf = gtk_widget_render_icon(widget, stock_id, GTK_ICON_SIZE_MENU, NULL); gtk_widget_destroy(widget); return pixbuf; } /** * 让窗体(widget)支持uri拖拽操作. * @param widget widget */ void widget_enable_dnd_uri(GtkWidget *widget) { static const GtkTargetEntry target = {(gchar *)"text/uri-list", 0, 0}; gtk_drag_dest_set(widget, GTK_DEST_DEFAULT_ALL, &target, 1, GDK_ACTION_MOVE); } /** * 由(GtkSelectionData)获取(uri)文件链表. * @param data selection data * @return 文件链表 */ GSList *selection_data_get_path(GtkSelectionData *data) { const char *prl = "file://"; gchar **uris, **ptr, *uri; GSList *filelist; if (!(uris = gtk_selection_data_get_uris(data))) return NULL; filelist = NULL; ptr = uris; while (*ptr) { uri = g_uri_unescape_string(*ptr, NULL); if (strncasecmp(uri, prl, strlen(prl)) == 0) filelist = g_slist_append(filelist, g_strdup(uri + strlen(prl))); else filelist = g_slist_append(filelist, g_strdup(uri)); g_free(uri); ptr++; } g_strfreev(uris); return filelist; } /** * 获取局域网网段名称. * @param ipv4 ipv4 * @return name */ char *ipv4_get_lan_name(in_addr_t ipv4) { /** * @note 局域网网段划分,每两个为一组,以NULL标识结束. */ const char *localgroup[] = { "10.0.0.0", "10.255.255.255", "172.16.0.0", "172.31.255.255", "192.168.0.0", "192.168.255.255", NULL }; in_addr_t startip, endip; uint8_t count; char *ipstr; ipv4 = ntohl(ipv4); ipstr = NULL; count = 0; while (localgroup[count << 1]) { inet_pton(AF_INET, localgroup[count << 1], &startip); startip = ntohl(startip); inet_pton(AF_INET, localgroup[(count << 1) + 1], &endip); endip = ntohl(endip); ipv4_order(&startip, &endip); if (startip <= ipv4 && endip >= ipv4) { ipstr = g_strdup_printf("%s~%s", localgroup[count << 1], localgroup[(count << 1) + 1]); break; } count++; } return ipstr; } /** * 让套接口支持广播. * @param sock socket */ void socket_enable_broadcast(int sock) { socklen_t len; int optval; optval = 1; len = sizeof(optval); setsockopt(sock, SOL_SOCKET, SO_BROADCAST, &optval, len); } /** * 让套接口监听端口可重用. * @param sock socket */ void socket_enable_reuse(int sock) { socklen_t len; int optval; optval = 1; len = sizeof(optval); setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &optval, len); } /** * 获取系统主机的广播地址. * @param sock socket * @return 广播地址链表 * @note 链表数据不是指针而是实际的IP */ GSList *get_sys_broadcast_addr(int sock) { const uint8_t amount = 5; //支持5个IP地址 uint8_t count, sum; struct ifconf ifc; struct ifreq *ifr; struct sockaddr_in *addr; GSList *list; list = g_slist_append(NULL, GUINT_TO_POINTER(inet_addr("255.255.255.255"))); ifc.ifc_len = amount * sizeof(struct ifreq); ifc.ifc_buf = (caddr_t)g_malloc(ifc.ifc_len); if (ioctl(sock, SIOCGIFCONF, &ifc) == -1) { g_free(ifc.ifc_buf); return list; } sum = ifc.ifc_len / sizeof(struct ifreq); count = 0; while (count < sum) { ifr = ifc.ifc_req + count; count++; if (ioctl(sock, SIOCGIFFLAGS, ifr) == -1 || !(ifr->ifr_flags & IFF_BROADCAST) || ioctl(sock, SIOCGIFBRDADDR, ifr) == -1) continue; addr = (struct sockaddr_in *)&ifr->ifr_broadaddr; list = g_slist_append(list, GUINT_TO_POINTER(addr->sin_addr.s_addr)); } g_free(ifc.ifc_buf); return list; } /** * 获取系统主机的IP地址. * @param sock socket * @return IP地址链表 * @note 链表数据不是指针而是实际的IP */ GSList *get_sys_host_addr(int sock) { const uint8_t amount = 5; //支持5个IP地址 uint8_t count, sum; struct ifconf ifc; struct ifreq *ifr; struct sockaddr_in *addr; GSList *list; list = NULL; ifc.ifc_len = amount * sizeof(struct ifreq); ifc.ifc_buf = (caddr_t)g_malloc(ifc.ifc_len); if (ioctl(sock, SIOCGIFCONF, &ifc) == -1) { g_free(ifc.ifc_buf); return list; } sum = ifc.ifc_len / sizeof(struct ifreq); count = 0; while (count < sum) { ifr = ifc.ifc_req + count; count++; if (strncasecmp(ifr->ifr_name, "lo", 2) == 0 || ioctl(sock, SIOCGIFFLAGS, ifr) == -1 || !(ifr->ifr_flags & IFF_UP) || ioctl(sock, SIOCGIFADDR, ifr) == -1) continue; addr = (struct sockaddr_in *)&ifr->ifr_broadaddr; list = g_slist_append(list, GUINT_TO_POINTER(addr->sin_addr.s_addr)); } g_free(ifc.ifc_buf); return list; } /** * 获取系统主机的IP地址串描述 * @param sock socket * @return 描述串 */ char *get_sys_host_addr_string(int sock) { char ipstr[INET_ADDRSTRLEN], *buf, *ptr; GSList *list, *tlist; uint16_t len; if (!(tlist = list = get_sys_host_addr(sock))) return NULL; len = g_slist_length(list) * INET_ADDRSTRLEN; ptr = buf = (char *)g_malloc(len); while (tlist) { inet_ntop(AF_INET, &tlist->data, ipstr, INET_ADDRSTRLEN); snprintf(ptr, len, "%s\n", ipstr); ptr += strlen(ptr); len -= INET_ADDRSTRLEN; tlist = g_slist_next(tlist); } *(ptr - 1) = '\0'; //抹除最后一个换行符 g_slist_free(list); return buf; } iptux-0.6.3/src/support.h000077500000000000000000000017341257720006400153600ustar00rootroot00000000000000// // C++ Interface: support // // Description: // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef SUPPORT_H #define SUPPORT_H #include "mess.h" void iptux_init(); void iptux_gui_quit(); void iptux_quit(int); void analysis_parameter(int argc, char *const argv[]); void print_version(); void print_usage(); void print_stun(); void iptux_open_url(const char *url); void bind_iptux_port(); void init_iptux_environment(); void pixbuf_shrink_scale_1(GdkPixbuf **pixbuf, int width, int height); GdkPixbuf *obtain_pixbuf_from_stock(const gchar *stock_id); void widget_enable_dnd_uri(GtkWidget *widget); GSList *selection_data_get_path(GtkSelectionData *data); char *ipv4_get_lan_name(in_addr_t ipv4); void socket_enable_broadcast(int sock); void socket_enable_reuse(int sock); GSList *get_sys_broadcast_addr(int sock); GSList *get_sys_host_addr(int sock); char *get_sys_host_addr_string(int sock); #endif iptux-0.6.3/src/sys.h000077500000000000000000000017131257720006400144570ustar00rootroot00000000000000// // C++ Interface: sys // // Description: // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef SYS_H #define SYS_H #ifdef HAVE_CONFIG_H # include #endif /* */ #define __STDC_LIMIT_MACROS /* */ #define __STDC_FORMAT_MACROS #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // #include #include #include #include #include #ifndef _ #define _(string) gettext(string) #endif #ifdef __APPLE__ # define O_LARGEFILE 0 #endif #endif iptux-0.6.3/src/uninstall/000077500000000000000000000000001257720006400154745ustar00rootroot00000000000000iptux-0.6.3/src/uninstall/Makefile.am000077500000000000000000000004261257720006400175350ustar00rootroot00000000000000# uninstall program bin_PROGRAMS = ihateiptux ihateiptux_SOURCES = ihateiptux.cpp utils.cpp AM_CXXFLAGS = -Wall # set the include path found by configure AM_CPPFLAGS = $(all_includes) # the library search path. ihateiptux_LDFLAGS = $(all_libraries) noinst_HEADERS = utils.h iptux-0.6.3/src/uninstall/Makefile.in000066400000000000000000000447211257720006400175510ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = ihateiptux$(EXEEXT) subdir = src/uninstall ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_ihateiptux_OBJECTS = ihateiptux.$(OBJEXT) utils.$(OBJEXT) ihateiptux_OBJECTS = $(am_ihateiptux_OBJECTS) ihateiptux_LDADD = $(LDADD) ihateiptux_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(ihateiptux_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(ihateiptux_SOURCES) DIST_SOURCES = $(ihateiptux_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GST_CFLAGS = @GST_CFLAGS@ GST_LIBS = @GST_LIBS@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ desktopdir = @desktopdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logodir = @logodir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pixmapsdir = @pixmapsdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sounddir = @sounddir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ihateiptux_SOURCES = ihateiptux.cpp utils.cpp AM_CXXFLAGS = -Wall # set the include path found by configure AM_CPPFLAGS = $(all_includes) # the library search path. ihateiptux_LDFLAGS = $(all_libraries) noinst_HEADERS = utils.h all: all-am .SUFFIXES: .SUFFIXES: .cpp .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/uninstall/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/uninstall/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) ihateiptux$(EXEEXT): $(ihateiptux_OBJECTS) $(ihateiptux_DEPENDENCIES) $(EXTRA_ihateiptux_DEPENDENCIES) @rm -f ihateiptux$(EXEEXT) $(AM_V_CXXLD)$(ihateiptux_LINK) $(ihateiptux_OBJECTS) $(ihateiptux_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ihateiptux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # 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: iptux-0.6.3/src/uninstall/ihateiptux.cpp000077500000000000000000000055561257720006400204020ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2009 by Jally * * jallyx@163.com * * * * 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. * ***************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "utils.h" #include "../sys.h" int main(int argc, char *argv[]) { setlocale(LC_ALL, ""); bindtextdomain(GETTEXT_PACKAGE, __LOCALE_PATH); bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); textdomain(GETTEXT_PACKAGE); check_privileged(); remove_file(__DESKTOP_PATH "/iptux.desktop"); remove_file(__LOGO_PATH "/hicolor/64x64/apps/ip-tux.png"); remove_file(__LOGO_PATH "/hicolor/64x64/apps/i-tux.png"); remove_file(__LOGO_PATH "/hicolor/48x48/apps/ip-tux.png"); remove_file(__LOGO_PATH "/hicolor/48x48/apps/i-tux.png"); remove_file(__LOGO_PATH "/hicolor/32x32/apps/ip-tux.png"); remove_file(__LOGO_PATH "/hicolor/32x32/apps/i-tux.png"); remove_file(__LOGO_PATH "/hicolor/24x24/apps/ip-tux.png"); remove_file(__LOGO_PATH "/hicolor/24x24/apps/i-tux.png"); remove_file(__LOGO_PATH "/hicolor/22x22/apps/ip-tux.png"); remove_file(__LOGO_PATH "/hicolor/22x22/apps/i-tux.png"); remove_file(__LOGO_PATH "/hicolor/16x16/apps/ip-tux.png"); remove_file(__LOGO_PATH "/hicolor/16x16/apps/i-tux.png"); remove_file(__EXEC_PATH "/iptux"); remove_file(__EXEC_PATH "/ihateiptux"); remove_folder(__DATA_PATH "/iptux"); remove_file(__LOCALE_PATH "/en_GB/LC_MESSAGES/iptux.mo"); remove_file(__LOCALE_PATH "/zh_CN/LC_MESSAGES/iptux.mo"); remove_file(__LOCALE_PATH "/zh_TW/LC_MESSAGES/iptux.mo"); return 0; } iptux-0.6.3/src/uninstall/utils.cpp000077500000000000000000000037111257720006400173450ustar00rootroot00000000000000// // C++ Implementation: utils // // Description: // // // Author: Jally , (C) 2009 // // Copyright: See COPYING file that comes with this distribution // // #include "utils.h" #include "../sys.h" #define MAX_PATHLEN 1024 void check_privileged() { struct passwd *pw; pw = getpwnam("root"); endpwent(); if (pw && (pw->pw_uid != geteuid())) errx(1, _("The user is not privileged!\n")); } void remove_folder(const char *path) { char buf[MAX_PATHLEN]; struct stat st; struct dirent *dirt; DIR *dir; if (!(dir = opendir(path))) { warnx(_("Opendir() directory \"%s\" failed, %s\n"), path, strerror(errno)); return; } while ( (dirt = readdir(dir))) { if ((strcmp(dirt->d_name, ".") == 0) || (strcmp(dirt->d_name, "..") == 0)) continue; snprintf(buf, MAX_PATHLEN, "%s/%s", path, dirt->d_name); if (stat(buf, &st) == -1) { warnx(_("Stat() file \"%s\" failed, %s\n"), buf, strerror(errno)); continue; } if (S_ISLNK(st.st_mode) || S_ISREG(st.st_mode)) { if (unlink(buf) == -1) warnx(_("Unlink() file \"%s\" failed, %s\n"), buf, strerror(errno)); } else if (S_ISDIR(st.st_mode)) { remove_folder(buf); } } closedir(dir); if (rmdir(path) == -1) warnx(_("Rmdir() directory \"%s\" failed, %s\n"), buf, strerror(errno)); } void remove_file(const char *path) { if (unlink(path) == -1) warnx(_("Unlink() file \"%s\" failed, %s\n"), path, strerror(errno)); } iptux-0.6.3/src/uninstall/utils.h000077500000000000000000000004661257720006400170160ustar00rootroot00000000000000// // C++ Interface: utils // // Description: // // // Author: Jally , (C) 2009 // // Copyright: See COPYING file that comes with this distribution // // #ifndef utils_h #define utils_h void check_privileged(); void remove_folder(const char *path); void remove_file(const char *path); #endif iptux-0.6.3/src/utils.cpp000077500000000000000000000370251257720006400153410ustar00rootroot00000000000000// // C++ Implementation: utils // // Description: // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #include "utils.h" #ifndef __APPLE__ #include #endif /** * 对两个主机序的ipv4地址进行排序. * @param ip1 ipv4(host byte order) * @param ip2 ipv4(host byte order) */ void ipv4_order(in_addr_t *ip1, in_addr_t *ip2) { in_addr_t ip; if (*ip1 > *ip2) { ip = *ip1; *ip1 = *ip2; *ip2 = ip; } } /** * 检查串(string)是否为有效的utf8串,若不是则根据字符集(codeset)来进行转码. * @param string 待检查的字符串 * @param codeset 字符集编码,e.g. * @retval encode 正确的字符集编码由此返回 * @return 有效的utf8串 * @note 若(string)为utf8编码,或(codeset)中不存在(string)的正确编码,函数将返回NULL * @see iptux_string_validate_copy() */ char *iptux_string_validate(const char *string, const char *codeset, char **encode) { const char *pptr, *ptr; char *tstring, *cset; gsize rbytes, wbytes; *encode = NULL; //设置字符集编码未知 tstring = NULL; //设置utf8有效串尚未成功获取 if (!g_utf8_validate(string, -1, NULL) && codeset) { cset = NULL; ptr = codeset; do { if (*(pptr = ptr + strspn(ptr, ",;\x20\t")) == '\0') break; if (!(ptr = strpbrk(pptr, ",;\x20\t"))) ptr = pptr + strlen(pptr); g_free(cset); cset = g_strndup(pptr, ptr - pptr); if (strcasecmp(cset, "utf-8") == 0) continue; } while (!(tstring = g_convert(string, -1, "utf-8", cset, &rbytes, &wbytes, NULL))); *encode = cset; } return tstring; } /** * 检查串(string)是否为有效的utf8串,若不是则根据字符集(codeset)来进行转码. * @param string 待检查的字符串 * @param codeset 字符集编码,e.g. * @retval encode 正确的字符集编码由此返回 * @return 有效的utf8串 * @note 本函数无论处理结果如何,都会无条件的返回一个字符集编码以及一个新串 * @see iptux_string_validate() */ char *iptux_string_validate_copy(const char *string, const char *codeset, char **encode) { char *tstring; if (!codeset || !(tstring = iptux_string_validate(string, codeset, encode))) { *encode = g_strdup("utf-8"); tstring = g_strdup(string); } return tstring; } /** * 转换字符串编码. * @param string 字符串 * @param tocode 目标编码 * @param fromcode 源编码 * @return 新串 * @note 若函数执行出错,将返回NULL */ char *convert_encode(const char *string, const char *tocode, const char *fromcode) { gsize rbytes, wbytes; char *tstring; tstring = g_convert(string, -1, tocode, fromcode, &rbytes, &wbytes, NULL); return tstring; } /** * 转换字符串编码. * @param string 字符串 * @param tocode 目标编码 * @param fromcode 源编码 * @return 新串 * @note 无论函数处理结果如何,都将会返回一个新串 */ char *convert_encode_copy(const char *string, const char *tocode, const char *fromcode) { char *tstring; if (!(tstring = convert_encode(string, tocode, fromcode))) tstring = g_strdup(string); return tstring; } /** * 获取文件系统的存储空间信息. * @param path 文件路径 * @retval avail 可用空间由此返回 * @retval total 全部空间由此返回 */ void get_file_system_info(const char *path, int64_t *avail, int64_t *total) { #ifdef __APPLE__ *avail = *total = 0; #else struct statfs64 st; int result; mark: switch (result = statfs64(path, &st)) { case 0: *avail = (int64_t)st.f_bsize * st.f_bavail; *total = (int64_t)st.f_bsize * st.f_blocks; break; default: if (errno == EINTR) goto mark; *avail = *total = 0; break; } #endif } /** * 从字符串(str)当前位置开始提取一行数据. * @param str 字符串起始指针 * @return 从(str)开始的一行数据 * @note 首部、尾部的空白字符将会被删除 */ char *iptux_string_getline(const char *str) { const char *pptr, *ptr; char *dst; size_t len; dst = NULL; pptr = str + strspn(str, "\x20\t"); ptr = strpbrk(pptr, "\r\n"); if ( (len = ptr ? (ptr - pptr) : strlen(pptr))) { dst = g_strndup(pptr, len); g_strchomp(dst); } return dst; } /** * 确保(path)所指向的文件不存在. * @param path 文件路径 * @return 新文件路径 * */ char *assert_filename_inexist(const char *path) { char buf[MAX_PATHLEN]; const char *ptr; uint16_t count; if (access(path, F_OK) != 0) return g_strdup(path); ptr = strrchr(path, '/'); ptr = ptr ? ptr + 1 : path; count = 1; while (count) { snprintf(buf, MAX_PATHLEN, "%.*s%" PRIu16 "_%s", (int)(ptr - path), path, count, ptr); if (access(buf, F_OK) != 0) break; count++; } /* 概率极低,不妨忽略错误情形 */ return g_strdup(buf); } /** * 获取包含指定数据的格式化时间串. * @param date 是否需要包含日期 * @param format as in printf() * @param ... as in printf() * @return 时间串 */ char *getformattime(gboolean date, const char *format, ...) { char buf[MAX_BUFLEN], *msg, *ptr; struct tm *tm; time_t tt; va_list ap; va_start(ap, format); msg = g_strdup_vprintf(format, ap); va_end(ap); time(&tt); tm = localtime(&tt); if (date) strftime(buf, MAX_BUFLEN, "%c", tm); else strftime(buf, MAX_BUFLEN, "%X", tm); ptr = g_strdup_printf("(%s) %s:", buf, msg); g_free(msg); return ptr; } /** * 对GtkTextBuffer的迭代器(GtkTextIter)所指的字符进行比较. * @param src 源字符 * @param dst 目标字符 * @return Gtk+库 */ gboolean giter_compare_foreach(gunichar src, gunichar dst) { return (src == dst); } /** * 把数值(numeric)转换为文件长度描述串. * @param numeric 需要转换的数值 * @return 描述串 */ char *numeric_to_size(int64_t numeric) { gchar *ptr; if (numeric >= ((int64_t)1 << 40)) ptr = g_strdup_printf("%.1fT", (float)numeric / ((int64_t)1 << 40)); else if (numeric >= (1 << 30)) ptr = g_strdup_printf("%.1fG", (float)numeric / (1 << 30)); else if (numeric >= (1 << 20)) ptr = g_strdup_printf("%.1fM", (float)numeric / (1 << 20)); else if (numeric >= (1 << 10)) ptr = g_strdup_printf("%.1fK", (float)numeric / (1 << 10)); else ptr = g_strdup_printf("%" PRId64 "B", numeric); return ptr; } /** * 把数值(numeric)转换为速度大小描述串. * @param numeric 需要转换的数值 * @return 描述串 */ char *numeric_to_rate(uint32_t numeric) { gchar *ptr; if (numeric >= (1 << 30)) ptr = g_strdup_printf("%.1fG/s", (float)numeric / (1 << 30)); else if (numeric >= (1 << 20)) ptr = g_strdup_printf("%.1fM/s", (float)numeric / (1 << 20)); else if (numeric >= (1 << 10)) ptr = g_strdup_printf("%.1fK/s", (float)numeric / (1 << 10)); else ptr = g_strdup_printf("%" PRIu32 "B/s", numeric); return ptr; } /** * 把数值(numeric)转换为时间长度描述串. * @param numeric 需要转换的数值 * @return 描述串 */ char *numeric_to_time(uint32_t numeric) { uint32_t hour, minute; gchar *ptr; hour = numeric / 3600; numeric %= 3600; minute = numeric / 60; numeric %= 60; ptr = g_strdup_printf("%.2" PRIu32 ":%.2" PRIu32 ":%.2" PRIu32, hour, minute, numeric); return ptr; } /** * 查询以(string)为起始点,(times)个字符串后的指针位置. * @param string 串起始点 * @param size 串有效长度 * @param times 跳跃次数 * @return 指针位置 */ const char *iptux_skip_string(const char *string, size_t size, uint8_t times) { const char *ptr; uint8_t count; ptr = string; count = 0; while (count < times) { ptr += strlen(ptr) + 1; if ((size_t)(ptr - string) >= size) { ptr = NULL; break; } count++; } return ptr; } /** * 查询以(string)为起始点,跳跃(times)次(ch)字符后的指针位置. * @param string 串起始点 * @param ch 分割字符 * @param times 跳跃次数 * @return 指针位置 */ const char *iptux_skip_section(const char *string, char ch, uint8_t times) { const char *ptr; uint8_t count; ptr = string; count = 0; while (count < times) { if (!(ptr = strchr(ptr, ch))) break; ptr++; //跳过当前分割字符 count++; } return ptr; } /** * 读取以(msg)为起始点,跳跃(times)次(ch)字符后的16进制数值. * @param msg 串起始点 * @param ch 分割字符 * @param times 跳跃次数 * @return 数值 */ int64_t iptux_get_hex64_number(const char *msg, char ch, uint8_t times) { const char *ptr; int64_t number; if (!(ptr = iptux_skip_section(msg, ch, times))) return 0; if (sscanf(ptr, "%" SCNx64, &number) == 1) return number; return 0; } /** * 读取以(msg)为起始点,跳跃(times)次(ch)字符后的16进制数值. * @param msg 串起始点 * @param ch 分割字符 * @param times 跳跃次数 * @return 数值 */ uint32_t iptux_get_hex_number(const char *msg, char ch, uint8_t times) { const char *ptr; uint32_t number; if (!(ptr = iptux_skip_section(msg, ch, times))) return 0; if (sscanf(ptr, "%" SCNx32, &number) == 1) return number; return 0; } /** * 读取以(msg)为起始点,跳跃(times)次(ch)字符后的10进制数值. * @param msg 串起始点 * @param ch 分割字符 * @param times 跳跃次数 * @return 数值 */ uint32_t iptux_get_dec_number(const char *msg, char ch, uint8_t times) { const char *ptr; uint32_t number; if (!(ptr = iptux_skip_section(msg, ch, times))) return 0; if (sscanf(ptr, "%" SCNu32, &number) == 1) return number; return 0; } /** * 读取以(msg)为起始点,跳跃(times)次(ch)字符后的一个字段. * @param msg 串起始点 * @param ch 分割字符 * @param times 跳跃次数 * @return 新串 */ char *iptux_get_section_string(const char *msg, char ch, uint8_t times) { const char *pptr, *ptr; char *string; size_t len; if (!(pptr = iptux_skip_section(msg, ch, times))) return NULL; ptr = strchr(pptr, ch); if ((len = ptr ? ptr - pptr : strlen(pptr)) == 0) return NULL; string = g_strndup(pptr, len); return string; } /** * 读取以(msg)为起始点,跳跃(times)次(ch)字符后的一个文件名. * @param msg 串起始点 * @param ch 分割字符 * @param times 跳跃次数 * @return 新串 * * @note 文件名特殊格式请参考IPMsg协议 * @note (msg)串会被修改 */ char *ipmsg_get_filename(const char *msg, char ch, uint8_t times) { static uint32_t serial = 1; char filename[256]; //文件最大长度为255 const char *ptr; size_t len; if ( (ptr = iptux_skip_section(msg, ch, times))) { len = 0; while (*ptr != ':' || strncmp(ptr, "::", 2) == 0) { if (len < 255) { //防止缓冲区溢出 filename[len] = *ptr; len++; } if (*ptr == ':') { //抹除分割符 memcpy((void *)ptr, "xx", 2); ptr++; } ptr++; } filename[len] = '\0'; } else snprintf(filename, 256, "%" PRIu32 "_file", serial++); return g_strdup(filename); } /** * 读取以(msg)为起始点,跳跃(times)次(ch)字符后的完整串. * @param msg 串起始点 * @param ch 分割字符 * @param times 跳跃次数 * @return 新串 */ char *ipmsg_get_attach(const char *msg, char ch, uint8_t times) { const char *ptr; if (!(ptr = iptux_skip_section(msg, ch, times))) return NULL; return g_strdup(ptr); } /** * 从文件路径中分离出文件名,并转化为(IPMsg)格式的文件名. * @param pathname 文件路径 * @return 文件名 * * @note 文件名特殊格式请参考IPMsg协议 */ char *ipmsg_get_filename_pal(const char *pathname) { char filename[512]; //文件最大长度为255 const char *ptr; size_t len; ptr = strrchr(pathname, '/'); ptr = ptr ? ptr + 1 : pathname; len = 0; while (*ptr && len < 510) { if (*ptr == ':') { memcpy(filename + len, "::", 2); len += 2; } else { filename[len] = *ptr; len++; } ptr++; } filename[len] = '\0'; return g_strdup(filename); } /** * 从文件路径中分离出文件名以及路径. * @param pathname 文件路径 * @retval path 路径由此返回 * @return 文件名 * * @note 路径可能为NULL */ char *ipmsg_get_filename_me(const char *pathname, char **path) { const char *ptr; char *file; ptr = strrchr(pathname, '/'); if (ptr && ptr != pathname) { file = g_strdup(ptr + 1); if (path) *path = g_strndup(pathname, ptr - pathname); } else { file = g_strdup(pathname); if (path) *path = NULL; } return file; } /** * 从文件名中移除后缀. * @param filename 文件名 * @return 文件 * */ char *iptux_erase_filename_suffix(const char *filename) { const char *ptr; char *file; ptr = strrchr(filename, '.'); if (ptr && ptr != filename) file = g_strndup(filename, ptr - filename); else file = g_strdup(filename); return file; } /** * 从给定的文件路径和文件名返回全文件名. * @param path 文件路径 * @param name 文件名 * @return 带路径的文件名 * */ char *ipmsg_get_pathname_full(const char *path, const char *name) { char filename[MAX_PATHLEN]; strcpy(filename,path); strcat(filename,"/"); strcat(filename,name); return g_strdup(filename); } iptux-0.6.3/src/utils.h000077500000000000000000000046771257720006400150150ustar00rootroot00000000000000// // C++ Interface: utils // // Description: // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef UTILS_H #define UTILS_H #include "mess.h" #define difftimeval(val2,val1) \ ((((val2).tv_sec-(val1).tv_sec)*1000000 \ + (val2).tv_usec-(val1).tv_usec) \ / 1000000.0f) #define percent(num1,num2) (100.0f*(num1)/(num2)) #define FLAG_ISSET(num,bit) ((num)&(1<<(bit))) #define FLAG_SET(num,bit) ((num)|=(1<<(bit))) #define FLAG_CLR(num,bit) ((num)&=(~(1<<(bit)))) #define URL_REGEX "(http|ftp|https|sftp):\\/\\/[\\w\\-_]+(\\.[\\w\\-_]+)+" \ "([\\w\\-\\.,@?^=%&:/~\\+#]*[\\w\\-\\@?^=%&/~\\+#])?" #define NO_OPERATION_C while(0); typedef void *(*ThreadFunc)(void *); void ipv4_order(in_addr_t *ip1, in_addr_t *ip2); char *iptux_string_validate(const char *string, const char *codeset, char **encode); char *iptux_string_validate_copy(const char *string, const char *codeset, char **encode); char *convert_encode(const char *string, const char *tocode, const char *fromcode); char *convert_encode_copy(const char *string, const char *tocode, const char *fromcode); void get_file_system_info(const char *path, int64_t *avail, int64_t *total); char *iptux_string_getline(const char *str); char *assert_filename_inexist(const char *path); char *getformattime(gboolean date, const char *format, ...); gboolean giter_compare_foreach(gunichar src, gunichar dst); char *numeric_to_size(int64_t numeric); char *numeric_to_rate(uint32_t numeric); char *numeric_to_time(uint32_t numeric); /* 以下函数调用的(ch)参数字符不应为('\0') */ const char *iptux_skip_string(const char *string, size_t size, uint8_t times); const char *iptux_skip_section(const char *string, char ch, uint8_t times); int64_t iptux_get_hex64_number(const char *msg, char ch, uint8_t times); uint32_t iptux_get_hex_number(const char *msg, char ch, uint8_t times); uint32_t iptux_get_dec_number(const char *msg, char ch, uint8_t times); char *iptux_get_section_string(const char *msg, char ch, uint8_t times); char *ipmsg_get_filename(const char *msg, char ch, uint8_t times); char *ipmsg_get_attach(const char *msg, char ch, uint8_t times); char *ipmsg_get_filename_pal(const char *pathname); char *ipmsg_get_filename_me(const char *pathname, char **path); char *iptux_erase_filename_suffix(const char *filename); char *ipmsg_get_pathname_full(const char *path, const char *name); #endif iptux-0.6.3/src/wrapper.cpp000077500000000000000000000144551257720006400156630ustar00rootroot00000000000000// // C++ Implementation: wrapper // // Description: // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #include "wrapper.h" #include "deplib.h" /** * 保证new运算符申请内存一定成功. * @param size 需要申请的内存大小 * @return 新内存指针 */ void *operator new(size_t size) { return g_malloc(size); } /** * 写出数据. * @param fd 文件描述符 * @param buf 缓冲区 * @param count 缓冲区有效数据长度 * @return 成功写出的数据长度 */ ssize_t xwrite(int fd, const void *buf, size_t count) { size_t offset; ssize_t size; size = -1; offset = 0; while ((offset != count) && (size != 0)) { if ((size = write(fd, (char *)buf + offset, count - offset)) == -1) { if (errno == EINTR) continue; return -1; } offset += size; } return offset; } /** * 读取数据. * @param fd 文件描述符 * @param buf 缓冲区 * @param count 缓冲区长度 * @return 成功读取的数据长度 */ ssize_t xread(int fd, void *buf, size_t count) { size_t offset; ssize_t size; size = -1; offset = 0; while ((offset != count) && (size != 0)) { if ((size = read(fd, (char *)buf + offset, count - offset)) == -1) { if (errno == EINTR) continue; return -1; } offset += size; } return offset; } /** * 读取ipmsg消息前缀. * Ver(1):PacketNo:SenderName:SenderHost:CommandNo:AdditionalSection.\n * @param fd 文件描述符 * @param buf 缓冲区 * @param count 缓冲区长度 * @return 成功读取的消息长度,-1表示读取消息出错 */ ssize_t read_ipmsg_prefix(int fd, void *buf, size_t count) { uint number; size_t offset; ssize_t size; size = -1; offset = 0; number = 0; while ((offset != count) && (size != 0)) { if ((size = read(fd, (char *)buf + offset, count - offset)) == -1) { if (errno == EINTR) continue; return -1; } offset += size; const char *endptr = (const char *)buf + offset; for (const char *curptr = endptr - size; curptr < endptr; ++curptr) { if (*curptr == ':') ++number; } if (number >= 5) break; } return offset; } /** * 读取ipmsg文件请求消息前缀. * packetID:fileID:offset.\n * @param fd 文件描述符 * @param buf 缓冲区 * @param count 缓冲区长度 * @param offset 缓冲区无效数据偏移量 * @return 成功读取的消息长度,-1表示读取消息出错 */ ssize_t read_ipmsg_filedata(int fd, void *buf, size_t count, size_t offset) { const char *curptr; uint number; ssize_t size; size = -1; number = 0; curptr = (const char *)buf; while ((offset != count) && (size != 0)) { const char *endptr = (const char *)buf + offset; for (; curptr < endptr; ++curptr) { if (*curptr == ':') ++number; } if (number > 2 || (number == 2 && *(curptr - 1) != ':')) break; if ((size = read(fd, (char *)buf + offset, count - offset)) == -1) { if (errno == EINTR) continue; return -1; } offset += size; } return offset; } /** * 读取ipmsg目录请求消息前缀. * packetID:fileID.\n * @param fd 文件描述符 * @param buf 缓冲区 * @param count 缓冲区长度 * @param offset 缓冲区无效数据偏移量 * @return 成功读取的消息长度,-1表示读取消息出错 */ ssize_t read_ipmsg_dirfiles(int fd, void *buf, size_t count, size_t offset) { const char *curptr; uint number; ssize_t size; size = -1; number = 0; curptr = (const char *)buf; while ((offset != count) && (size != 0)) { const char *endptr = (const char *)buf + offset; for (; curptr < endptr; ++curptr) { if (*curptr == ':') ++number; } if (number > 1 || (number == 1 && *(curptr - 1) != ':')) break; if ((size = read(fd, (char *)buf + offset, count - offset)) == -1) { if (errno == EINTR) continue; return -1; } offset += size; } return offset; } /** * 读取ipmsg文件头信息. * 本函数的退出条件为: \n * 1.缓冲区内必须要有数据; \n * 2.文件头长度必须能够被获得; \n * 3.文件头长度必须小于或等于缓冲区内已有数据长度; \n * 4.读取数据出错(晕,这还值得怀疑吗?). \n * @param fd 文件描述符 * @param buf 缓冲区 * @param count 缓冲区长度 * @param offset 缓冲区无效数据偏移量 * @return 成功读取的信息长度 */ ssize_t read_ipmsg_fileinfo(int fd, void *buf, size_t count, size_t offset) { ssize_t size; uint32_t headsize; if (offset < count) //注意不要写到缓冲区外了 ((char *)buf)[offset] = '\0'; while (!offset || !strchr((char *)buf, ':') || sscanf((char *)buf, "%" SCNx32, &headsize) != 1 || headsize > offset) { mark: if ((size = read(fd, (char *)buf + offset, count - offset)) == -1) { if (errno == EINTR) goto mark; return -1; } else if (size == 0) return -1; if ((offset += size) == count) break; ((char *)buf)[offset] = '\0'; } return offset; } iptux-0.6.3/src/wrapper.h000077500000000000000000000012371257720006400153220ustar00rootroot00000000000000// // C++ Interface: wrapper // // Description:打包函数,使某些函数更加好用 // // // Author: Jally , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef WRAPPER_H #define WRAPPER_H #include "sys.h" ssize_t xwrite(int fd, const void *buf, size_t count); ssize_t xread(int fd, void *buf, size_t count); ssize_t read_ipmsg_prefix(int fd, void *buf, size_t count); ssize_t read_ipmsg_filedata(int fd, void *buf, size_t count, size_t offset); ssize_t read_ipmsg_dirfiles(int fd, void *buf, size_t count, size_t offset); ssize_t read_ipmsg_fileinfo(int fd, void *buf, size_t count, size_t offset); #endif iptux-0.6.3/style000066400000000000000000000003411257720006400137550ustar00rootroot000000000000001. 类或结构体的指针类型成员,若注释中加注了(*),则表明此项不可为(NULL); 2. 编程风格尽量采用Linux内核风格,但每一行的长度的限制是90列; 3. 强制类型转换采用C++风格.