diff --git a/Makefile.in b/Makefile.in index 9cb50c2d..0e96fa42 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 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. @@ -13,15 +13,11 @@ # PARTICULAR PURPOSE. @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -43,7 +39,7 @@ am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno configure.status.lineno + configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = @@ -51,10 +47,13 @@ SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -70,8 +69,6 @@ GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -100,6 +97,7 @@ GREP = @GREP@ GST_CFLAGS = @GST_CFLAGS@ GST_LIBS = @GST_LIBS@ HAVE_GSTREAMER = @HAVE_GSTREAMER@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -112,9 +110,8 @@ LIBS = @LIBS@ LOCALEDIR = @LOCALEDIR@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ @@ -139,9 +136,11 @@ 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@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -149,6 +148,7 @@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -172,8 +172,12 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AM_CFLAGS = -Wall #-fprofile-arcs -ftest-coverage -pg SUBDIRS = src po EXTRA_DIST = \ @@ -1450,7 +1454,7 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ - $(MAKE) stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @@ -1463,7 +1467,6 @@ $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(top_srcdir distclean-hdr: -rm -f config.h stamp-h1 -uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -1496,8 +1499,7 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: +$(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ @@ -1541,8 +1543,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -1567,8 +1569,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ @@ -1578,13 +1580,12 @@ ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique @@ -1599,24 +1600,22 @@ distclean-tags: distdir: $(DISTFILES) $(am__remove_distdir) - mkdir $(distdir) - $(mkdir_p) $(distdir)/po - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + 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; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ @@ -1630,7 +1629,7 @@ distdir: $(DISTFILES) list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ - || $(mkdir_p) "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ @@ -1638,6 +1637,8 @@ distdir: $(DISTFILES) $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ @@ -1648,7 +1649,7 @@ distdir: $(DISTFILES) -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -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 $(SHELL) $(install_sh) -c -m a+r {} {} \; \ + ! -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 @@ -1658,6 +1659,10 @@ dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) @@ -1684,6 +1689,8 @@ distcheck: dist GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ @@ -1723,7 +1730,7 @@ distcheck: dist $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ @@ -1791,12 +1798,20 @@ info-am: install-data-am: install-data-local +install-dvi: install-dvi-recursive + install-exec-am: +install-html: install-html-recursive + install-info: install-info-recursive install-man: +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -1817,24 +1832,26 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-info-am +uninstall-am: -uninstall-info: uninstall-info-recursive +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ - check-am clean clean-generic clean-recursive ctags \ - ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \ - dist-shar dist-tarZ dist-zip distcheck distclean \ - distclean-generic distclean-hdr distclean-recursive \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-data-local install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - maintainer-clean-recursive mostlyclean mostlyclean-generic \ - mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-info-am +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ + dist-hook dist-lzma dist-shar dist-tarZ 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-data-local 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-recursive \ + uninstall uninstall-am install-data-local: diff --git a/configure b/configure index 86d7c30b..5db75328 100755 --- a/configure +++ b/configure @@ -675,6 +675,7 @@ target_alias INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA +am__isrc CYGPATH_W PACKAGE VERSION @@ -686,6 +687,7 @@ MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM +MKDIR_P mkdir_p AWK SET_MAKE @@ -1852,7 +1854,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -am__api_version="1.9" +am__api_version='1.10' + ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then @@ -2045,38 +2048,53 @@ else $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi -if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' +{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + $as_echo_n "(cached) " >&6 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. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' + 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 + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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 + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" else - mkdir_p='$(install_sh) -d' + # 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. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" fi fi +{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac for ac_prog in gawk mawk nawk awk do @@ -2160,12 +2178,16 @@ else fi rmdir .tst 2>/dev/null -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +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_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 $as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } + fi fi # test whether we have cygpath @@ -2208,7 +2230,7 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} -install_sh=${install_sh-"$am_aux_dir/install-sh"} +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right @@ -2312,7 +2334,7 @@ else fi fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. @@ -2339,9 +2361,7 @@ fi { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } - - -if test $USE_MAINTAINER_MODE = yes; then + if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else @@ -2406,9 +2426,7 @@ if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi - - -if test "x$enable_dependency_tracking" != xno; then + if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else @@ -2417,7 +2435,6 @@ else fi - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3416,6 +3433,7 @@ else depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} 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 sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then @@ -3445,9 +3463,7 @@ fi $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - -if + if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= @@ -4287,6 +4303,7 @@ else depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} 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 sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then @@ -4316,9 +4333,7 @@ fi $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - -if + if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= @@ -5085,6 +5100,7 @@ else depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} 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 sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then @@ -5114,9 +5130,7 @@ fi $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - -if + if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= @@ -8221,6 +8235,7 @@ 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 @@ -8834,6 +8849,11 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix [\\/$]* | ?:[\\/]* ) 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 @@ -8890,6 +8910,7 @@ 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 "$tmp/subs.awk" >$tmp/out \ @@ -8944,21 +8965,22 @@ $as_echo "$as_me: error: could not create -" >&2;} { (exit 1); exit 1; }; } 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 - "$ac_file" | "$ac_file":* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for "$ac_file"" >`$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" | +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 @@ -8993,8 +9015,9 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} # 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. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + # 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\(//\)[^/]' \| \ diff --git a/po/Makefile.in.in b/po/Makefile.in.in index 7c26df4c..49548381 100644 --- a/po/Makefile.in.in +++ b/po/Makefile.in.in @@ -56,7 +56,7 @@ COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) SOURCES = POFILES = @POFILES@ GMOFILES = @GMOFILES@ -DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \ +DISTFILES = LINGUAS ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \ $(POFILES) $(GMOFILES) $(SOURCES) POTFILES = \ diff --git a/src/callback_func.c b/src/callback_func.c index 87577ed7..aa4299ab 100644 --- a/src/callback_func.c +++ b/src/callback_func.c @@ -299,7 +299,7 @@ callback_show_tables(gint type) return; } - while((clid < ID_CUP_START && !league_from_clid(clid)->active) || + while((clid < ID_CUP_START && !query_league_active(league_from_clid(clid))) || (clid >= ID_CUP_START && cup_has_tables(clid) == -1)) { if(type == SHOW_PREVIOUS_LEAGUE) @@ -693,7 +693,7 @@ callback_show_league_stats(gint type) case SHOW_CURRENT: stat1 = current_user.tm->clid; while(stat1 >= ID_CUP_START || - !league_from_clid(stat1)->active) + !query_league_active(league_from_clid(stat1))) stat1 = league_cup_get_next_clid(stat1, FALSE); break; case SHOW_NEXT_LEAGUE: diff --git a/src/cup.c b/src/cup.c index 795c7434..dd2b2d7e 100644 --- a/src/cup.c +++ b/src/cup.c @@ -485,7 +485,7 @@ cup_load_choose_team_generate(Cup *cup, CupRound *cup_round, const CupChooseTeam for(k=0; k < g_array_index(leagues, League, leagues->len - 1).teams->len; k++) { - if(query_cup_has_property(cup->id, "league_talents")) + if(query_league_cup_has_property(cup->id, "league_talents")) { g_array_index( g_array_index(leagues, League, leagues->len - 1).teams, Team, k).average_talent = @@ -1056,7 +1056,7 @@ query_cup_begins(const Cup *cup) CupChooseTeam, i), &league, &cup_temp); if((cup_temp == NULL && - league->active && + query_league_active(league) && g_array_index(league->fixtures, Fixture, league->fixtures->len - 1).attendance == -1) || (league == NULL && @@ -1114,7 +1114,7 @@ cup_check_fixtures(const Cup *cup) if(g_array_index(cup->fixtures, Fixture, i).teams[0] == g_array_index(cup->fixtures, Fixture, i).teams[1]) { - if(!query_cup_has_property(cup->id, "silent_on_fixture_error")) + if(!query_league_cup_has_property(cup->id, "silent_on_fixture_error")) g_warning("cup_check_fixture: bad fixture found in cup %s; cup will be disabled\n", cup->name); return FALSE; diff --git a/src/cup.h b/src/cup.h index bc81c78e..a36763ab 100644 --- a/src/cup.h +++ b/src/cup.h @@ -34,13 +34,6 @@ #define cup_get_last_tables_round(clid) &g_array_index(cup_from_clid(clid)->rounds, CupRound, cup_has_tables(clid)) #define cup_get_last_tables(clid) g_array_index(cup_from_clid(clid)->rounds, CupRound, cup_has_tables(clid)).tables -#define query_cup_has_property(clid, string) query_misc_string_in_array(string, cup_from_clid(clid)->properties) - -#define query_cup_is_international(clid) query_cup_has_property(clid, "international") -#define query_cup_is_national(clid) query_cup_has_property(clid, "national") -#define query_cup_hide(clid) query_cup_has_property(clid, "hide") -#define query_cup_weak_at_home(clid) query_cup_has_property(clid, "weak_at_home") - Cup cup_new(gboolean new_id); diff --git a/src/finance.c b/src/finance.c index 6412b109..fefff26c 100644 --- a/src/finance.c +++ b/src/finance.c @@ -341,7 +341,7 @@ finance_assign_game_money(const Fixture *fix) gfloat journey_factor = (fix->clid < ID_CUP_START || (fix->clid >= ID_CUP_START && - query_cup_is_national(fix->clid))) ? + query_league_cup_has_property(fix->clid, "national"))) ? const_float("float_game_finance_journey_factor_national") : const_float("float_game_finance_journey_factor_international"); gint ticket_income[2] = {0, 0}; diff --git a/src/fixture.c b/src/fixture.c index d5db55bd..6a271fee 100644 --- a/src/fixture.c +++ b/src/fixture.c @@ -618,7 +618,7 @@ fixture_write_knockout_round(Cup *cup, gint cup_round, GPtrArray *teams) week_round_number = fixture_get_free_round(first_week, teams, -1, -1); for(i=0; i<=(teams->len - 2) / 2; i++) - if(!round->home_away && query_cup_weak_at_home(cup->id) && + if(!round->home_away && query_league_cup_has_property(cup->id, "weak_at_home") && league_from_clid(((Team*)g_ptr_array_index(teams, 2 * i))->clid)->layer < league_from_clid(((Team*)g_ptr_array_index(teams, 2 * i + 1))->clid)->layer) fixture_write(cup->fixtures, (Team*)g_ptr_array_index(teams, 2 * i + 1), @@ -1243,7 +1243,7 @@ fixture_get_next_week(gint *week_number, gint *week_round_number) *week_number = *week_round_number = 1000; for(i=0;ilen;i++) - if(lig(i).active) + if(query_league_active(&lig(i))) { fix = fixture_get_next(lig(i).id, local_week, local_round); if((fix->week_number > local_week || @@ -1290,7 +1290,7 @@ fixture_get_previous_week(gint *week_number, gint *week_round_number) *week_number = *week_round_number = -1; for(i=0;ilen;i++) - if(lig(i).active) + if(query_league_active(&lig(i))) { fix = fixture_get_previous(lig(i).id, local_week, local_round); if((fix->week_number < local_week || @@ -1335,7 +1335,7 @@ fixture_get_season_results(void) GPtrArray *results = g_ptr_array_new(); GArray *fixtures = NULL; - if(league_from_clid(current_user.tm->clid)->active) + if(query_league_active(league_from_clid(current_user.tm->clid))) { fixtures = league_from_clid(current_user.tm->clid)->fixtures; for(i=0;ilen;i++) diff --git a/src/game.c b/src/game.c index 096e1e66..a0d572da 100644 --- a/src/game.c +++ b/src/game.c @@ -350,7 +350,7 @@ game_assign_attendance(Fixture *fix) if(cup_from_clid(fix->clid)->rounds->len - fix->round <= const_int("int_game_stadium_attendance_cup_rounds_full_house")) factor = 1; - else if(query_cup_is_national(fix->clid)) + else if(query_league_cup_has_property(fix->clid, "national")) factor *= const_float("float_game_stadium_attendance_cup_national_factor"); else factor *= const_float("float_game_stadium_attendance_cup_international_factor"); @@ -378,7 +378,7 @@ game_assign_attendance_neutral(Fixture *fix) const GPtrArray *teamsp = (GPtrArray*)league_cup_get_teams(fix->clid); gfloat av_att = (fix->clid >= ID_CUP_START && - query_cup_is_international(fix->clid) && teamsp->len > 0) ? + query_league_cup_has_property(fix->clid, "international") && teamsp->len > 0) ? (gfloat)league_cup_average_capacity(fix->clid) : (gfloat)league_cup_average_capacity(lig(0).id); diff --git a/src/league.c b/src/league.c index 9e519033..dbfdf21c 100644 --- a/src/league.c +++ b/src/league.c @@ -71,6 +71,7 @@ league_new(gboolean new_id) new.joined_leagues = g_array_new(FALSE, FALSE, sizeof(JoinedLeague)); new.new_tables = g_array_new(FALSE, FALSE, sizeof(NewTable)); new.tables = g_array_new(FALSE, FALSE, sizeof(Table)); + new.properties = g_ptr_array_new(); new.first_week = new.week_gap = 1; new.two_match_weeks[0] = g_array_new(FALSE, FALSE, sizeof(gint)); @@ -80,8 +81,6 @@ league_new(gboolean new_id) new.stats = stat_league_new("", ""); - new.active = TRUE; - return new; } @@ -173,7 +172,7 @@ league_cup_get_next_clid(gint clid, gboolean count_inactive) if(i != ligs->len - 1) { - if(lig(i + 1).active || count_inactive) + if(query_league_active(&lig(i + 1)) || count_inactive) return_value = lig(i + 1).id; else return_value = league_cup_get_next_clid(lig(i + 1).id, count_inactive); @@ -182,7 +181,7 @@ league_cup_get_next_clid(gint clid, gboolean count_inactive) return_value = acp(0)->id; else { - if(lig(0).active || count_inactive) + if(query_league_active(&lig(0)) || count_inactive) return_value = lig(0).id; else return_value = league_cup_get_next_clid(lig(0).id, count_inactive); @@ -198,7 +197,7 @@ league_cup_get_next_clid(gint clid, gboolean count_inactive) return_value = acp(i + 1)->id; else { - if(lig(0).active || count_inactive) + if(query_league_active(&lig(0)) || count_inactive) return_value = lig(0).id; else return_value = league_cup_get_next_clid(lig(0).id, count_inactive); @@ -225,7 +224,7 @@ league_cup_get_previous_clid(gint clid, gboolean count_inactive) if(i != 0) { - if(lig(i - 1).active || count_inactive) + if(query_league_active(&lig(i - 1)) || count_inactive) return_value = lig(i - 1).id; else return_value = league_cup_get_previous_clid(lig(i - 1).id, count_inactive); @@ -234,7 +233,7 @@ league_cup_get_previous_clid(gint clid, gboolean count_inactive) return_value = acp(acps->len - 1)->id; else { - if(lig(ligs->len - 1).active || count_inactive) + if(query_league_active(&lig(ligs->len - 1)) || count_inactive) return_value = lig(ligs->len - 1).id; else return_value = league_cup_get_previous_clid(lig(ligs->len - 1).id, count_inactive); @@ -250,7 +249,7 @@ league_cup_get_previous_clid(gint clid, gboolean count_inactive) return_value = acp(i - 1)->id; else { - if(lig(ligs->len - 1).active || count_inactive) + if(query_league_active(&lig(ligs->len - 1)) || count_inactive) return_value = lig(ligs->len - 1).id; else return_value = league_cup_get_previous_clid(lig(ligs->len - 1).id, count_inactive); @@ -847,7 +846,7 @@ query_leagues_active_in_country(void) gint i; for(i=0;ilen;i++) - if(lig(i).active) + if(query_league_active(&lig(i))) return TRUE; return FALSE; diff --git a/src/league.h b/src/league.h index ad60f1a4..44e265f4 100644 --- a/src/league.h +++ b/src/league.h @@ -35,10 +35,15 @@ #define league_cup_get_fixtures(clid) (clid < ID_CUP_START) ? (league_from_clid(clid)->fixtures) : (cup_from_clid(clid)->fixtures) #define league_cup_get_name_string(clid) (clid < ID_CUP_START) ? league_from_clid(clid)->name : cup_from_clid(clid)->name #define league_cup_get_yellow_red(clid) (clid < ID_CUP_START) ? (league_from_clid(clid)->yellow_red) : (cup_from_clid(clid)->yellow_red) -#define league_table_cumul(league) (&g_array_index(league->tables, Table, 0)) -#define league_table(league) (&g_array_index(league->tables, Table, league->tables->len - 1)) + +#define league_cup_get_properties(clid) (clid < ID_CUP_START) ? ((gpointer)(league_from_clid(clid)->properties)) : ((gpointer)(cup_from_clid(clid)->properties)) +#define query_league_cup_has_property(clid, string) query_misc_string_in_array(string, (GArray*)league_cup_get_properties(clid)) + +#define league_table_cumul(league) (&g_array_index((league)->tables, Table, 0)) +#define league_table(league) (&g_array_index((league)->tables, Table, league->tables->len - 1)) #define query_league_has_prom_games(league) (league->prom_rel.prom_games_dest_sid != NULL) +#define query_league_active(league) (!query_league_cup_has_property((league)->id, "inactive")) /** A struct needed when managing promotions and relegations. */ diff --git a/src/league_struct.h b/src/league_struct.h index 80c69699..5cae3b3e 100644 --- a/src/league_struct.h +++ b/src/league_struct.h @@ -153,11 +153,10 @@ typedef struct GArray *new_tables; /** The fixtures of a season for the league. */ GArray *fixtures; + /** A gchar pointer array of properties (like "inactive"). */ + GPtrArray *properties; /** The current league statistics. */ LeagueStat stats; - /** Whether the league is only a container for teams - or really a league with fixtures and all. */ - gboolean active; } League; #endif diff --git a/src/start_end.c b/src/start_end.c index 5e106232..3968fc18 100644 --- a/src/start_end.c +++ b/src/start_end.c @@ -160,7 +160,7 @@ start_new_season(void) } for(i=0;ilen;i++) - if(lig(i).active) + if(query_league_active(&lig(i))) fixture_write_league_fixtures(&lig(i)); for(i=cps->len - 1; i >= 0; i--) @@ -421,7 +421,7 @@ end_week_round_update_fixtures(void) fixture_update(acp(i)); for(i=0;ilen;i++) - if(lig(i).active && week == + if(query_league_active(&lig(i)) && week == g_array_index( lig(i).fixtures, Fixture, lig(i).fixtures->len - 1).week_number && week_round == 1 && @@ -519,7 +519,7 @@ end_week_hide_cups(void) gint i; for(i=acps->len - 1; i >= 0; i--) - if(query_cup_hide(acp(i)->id) && + if(query_league_cup_has_property(acp(i)->id, "hide") && g_array_index(acp(i)->fixtures, Fixture, acp(i)->fixtures->len - 1).attendance > 0) g_ptr_array_remove_index(acps, i); } diff --git a/src/stat.c b/src/stat.c index bd70e640..f8ced274 100644 --- a/src/stat.c +++ b/src/stat.c @@ -26,6 +26,7 @@ #include "cup.h" #include "free.h" #include "league.h" +#include "misc.h" #include "option.h" #include "player.h" #include "stat.h" @@ -57,7 +58,7 @@ stat_update_leagues(void) gint i; for(i=0;ilen;i++) - if(lig(i).active && + if(query_league_active(&lig(i)) && g_array_index( lig(i).fixtures, Fixture, lig(i).fixtures->len - 1).week_number >= week) { diff --git a/src/table.c b/src/table.c index 3f0b0616..14baac3d 100644 --- a/src/table.c +++ b/src/table.c @@ -250,7 +250,7 @@ query_tables_in_country(void) gint i; for(i=0;ilen;i++) - if(lig(i).active) + if(query_league_active(&lig(i))) return TRUE; for(i=0;ilen;i++) diff --git a/src/team.c b/src/team.c index 88cfb4c7..897bd0a6 100644 --- a/src/team.c +++ b/src/team.c @@ -248,7 +248,7 @@ team_get_fixture(const Team *tm, gboolean last_fixture) if(tm->clid < ID_CUP_START) for(i=0;ilen;i++) { - if(lig(i).active && lig(i).id == tm->clid) + if(query_league_active(&lig(i)) && lig(i).id == tm->clid) { for(j=0;jlen;j++) if(g_array_index(lig(i).fixtures, Fixture, j).attendance == -1 && @@ -267,7 +267,7 @@ team_get_fixture(const Team *tm, gboolean last_fixture) fix->week_number != week || fix->week_round_number != week_round) { - if(query_cup_is_national(acp(i)->id) || + if(query_league_cup_has_property(acp(i)->id, "national") || query_team_is_in_cup(tm, acp(i))) { for(j=0;jfixtures->len;j++) @@ -287,7 +287,7 @@ team_get_fixture(const Team *tm, gboolean last_fixture) if(tm->clid < ID_CUP_START) for(i=0;ilen;i++) { - if(lig(i).active && lig(i).id == tm->clid) + if(query_league_active(&lig(i)) && lig(i).id == tm->clid) { for(j=lig(i).fixtures->len - 1;j>=0;j--) if(g_array_index(lig(i).fixtures, Fixture, j).attendance != -1 && @@ -306,7 +306,7 @@ team_get_fixture(const Team *tm, gboolean last_fixture) fix->week_number != week || fix->week_round_number != week_round - 1) { - if(query_cup_is_national(acp(i)->id) || + if(query_league_cup_has_property(acp(i)->id, "national") || query_team_is_in_cup(tm, acp(i))) { for(j=acp(i)->fixtures->len - 1;j>=0;j--) @@ -408,7 +408,7 @@ team_get_league_rank(const Team *tm) if(clid < ID_CUP_START) { - if(!league_from_clid(clid)->active) + if(!query_league_active(league_from_clid(clid))) return 0; elements = league_table(league_from_clid(tm->clid))->elements; @@ -888,7 +888,7 @@ query_team_plays(const Team *tm, gint week_number, gint week_round_number) return TRUE; for(i=0;ilen;i++) - if(query_cup_is_national(acp(i)->id) || + if(query_league_cup_has_property(acp(i)->id, "national") || query_team_is_in_cup(tm, acp(i))) for(j=0;jfixtures->len;j++) if(g_array_index(acp(i)->fixtures, Fixture, j).week_number == week_number && @@ -1200,7 +1200,7 @@ team_get_table_clid(const Team *tm) gint i; if(tm->clid >= ID_CUP_START || - (tm->clid < ID_CUP_START && !league_from_clid(tm->clid)->active)) + (tm->clid < ID_CUP_START && !query_league_active(league_from_clid(tm->clid)))) { for(i = acps->len - 1; i >= 0; i--) if(cup_has_tables(acp(i)->id) != -1 && diff --git a/src/transfer.c b/src/transfer.c index f14ab51d..f6d6de27 100644 --- a/src/transfer.c +++ b/src/transfer.c @@ -28,6 +28,7 @@ #include "finance.h" #include "free.h" #include "game_gui.h" +#include "league.h" #include "main.h" #include "maths.h" #include "misc.h" @@ -353,7 +354,7 @@ transfer_get_deadline(void) gint length = 0; for(i=0;ilen;i++) - if(lig(i).active) + if(query_league_active(&lig(i))) length = MAX(length, g_array_index( lig(i).fixtures, Fixture, lig(i).fixtures->len - 1).week_number); diff --git a/src/treeview.c b/src/treeview.c index 0642ba2b..52ab032a 100644 --- a/src/treeview.c +++ b/src/treeview.c @@ -956,7 +956,7 @@ treeview_create_fixture(const Fixture *fix, GtkListStore *ls) gint user_idx = fixture_user_team_involved(fix); if(fix->clid >= ID_CUP_START && - query_cup_is_international(fix->clid)) + query_league_cup_has_property(fix->clid, "international")) for(i=0;i<2;i++) symbol[i] = fix->teams[i]->symbol; @@ -984,7 +984,7 @@ treeview_create_fixture(const Fixture *fix, GtkListStore *ls) colour_bg, colour_fg, fix->teams[i]->name, rank); } else if(fix->clid >= ID_CUP_START && - query_cup_is_national(fix->clid)) + query_league_cup_has_property(fix->clid, "national")) sprintf(buf[i], "%s (%d)", colour_bg, colour_fg, fix->teams[i]->name, league_from_clid(fix->teams[i]->clid)->layer); diff --git a/src/treeview2.c b/src/treeview2.c index 0d7b6ff9..ef50f9fd 100644 --- a/src/treeview2.c +++ b/src/treeview2.c @@ -333,7 +333,7 @@ treeview2_create_bets(GtkListStore *ls) fix->teams[j]->name, rank); } else if(fix->clid >= ID_CUP_START && - query_cup_is_national(fix->clid)) + query_league_cup_has_property(fix->clid, "national")) sprintf(team_names[j], "%s (%d)", fix->teams[j]->name, league_from_clid(fix->teams[j]->clid)->layer); diff --git a/src/user.c b/src/user.c index 8738830a..27c6f0f2 100644 --- a/src/user.c +++ b/src/user.c @@ -811,21 +811,26 @@ user_history_to_string(const UserHistory *history, gchar *buf) void user_add_cup_success(User *user, const Cup *cup, gint round, gint type) { + gboolean international, national; + + international = query_league_cup_has_property(cup->id, "international"); + national = query_league_cup_has_property(cup->id, "national"); + if(type == USER_HISTORY_WIN_FINAL) { - if(query_cup_is_international(cup->id)) + if(international) user->counters[COUNT_USER_SUCCESS] += const_int("int_user_success_international_winner"); - else if(query_cup_is_national(cup->id)) + else if(national) user->counters[COUNT_USER_SUCCESS] += const_int("int_user_success_national_winner"); } else if(type == USER_HISTORY_LOSE_FINAL) { - if(query_cup_is_international(cup->id)) + if(international) user->counters[COUNT_USER_SUCCESS] += const_int("int_user_success_international_final"); - else if(query_cup_is_national(cup->id)) + else if(international) user->counters[COUNT_USER_SUCCESS] += const_int("int_user_success_national_winner"); const_int("int_user_success_national_final"); @@ -834,19 +839,19 @@ user_add_cup_success(User *user, const Cup *cup, gint round, gint type) { if(round == cup_from_clid(cup->id)->rounds->len - 2) { - if(query_cup_is_international(cup->id)) + if(international) user->counters[COUNT_USER_SUCCESS] += const_int("int_user_success_international_semis"); - else if(query_cup_is_national(cup->id)) + else if(national) user->counters[COUNT_USER_SUCCESS] += const_int("int_user_success_national_semis"); } else if(round == cup_from_clid(cup->id)->rounds->len - 3) { - if(query_cup_is_international(cup->id)) + if(international) user->counters[COUNT_USER_SUCCESS] += const_int("int_user_success_international_quarter"); - else if(query_cup_is_national(cup->id)) + else if(national) user->counters[COUNT_USER_SUCCESS] += const_int("int_user_success_national_quarter"); } diff --git a/src/xml.h b/src/xml.h index 0e3f5afc..89be0c07 100644 --- a/src/xml.h +++ b/src/xml.h @@ -53,6 +53,7 @@ enum XmlTags TAG_YELLOW_RED, TAG_TEAM_ID, TAG_NAMES_FILE, + TAG_PROPERTY, TAG_ROUND }; diff --git a/src/xml_league.c b/src/xml_league.c index 80329b55..5d4ce67c 100644 --- a/src/xml_league.c +++ b/src/xml_league.c @@ -50,9 +50,9 @@ #define TAG_YELLOW_RED "yellow_red" #define TAG_AVERAGE_TALENT "average_talent" #define TAG_NAMES_FILE "names_file" -#define TAG_ACTIVE "active" #define TAG_BREAK "break" #define TAG_JOINED_LEAGUE "joined_league" +#define TAG_PROPERTY "property" #define TAG_NEW_TABLE "new_table" #define TAG_PROM_REL "prom_rel" #define TAG_PROM_GAMES "prom_games" @@ -96,7 +96,6 @@ enum XmlLeagueStates STATE_YELLOW_RED, STATE_AVERAGE_TALENT, STATE_NAMES_FILE, - STATE_ACTIVE, STATE_PROM_REL, STATE_PROM_GAMES, STATE_PROM_GAMES_DEST_SID, @@ -118,6 +117,7 @@ enum XmlLeagueStates STATE_TEAM_DEF_FILE, STATE_BREAK, STATE_JOINED_LEAGUE, + STATE_PROPERTY, STATE_NEW_TABLE, STATE_TWO_MATCH_WEEK_START, STATE_TWO_MATCH_WEEK_END, @@ -178,10 +178,10 @@ xml_league_read_start_element (GMarkupParseContext *context, state = STATE_AVERAGE_TALENT; else if(strcmp(element_name, TAG_NAMES_FILE) == 0) state = STATE_NAMES_FILE; - else if(strcmp(element_name, TAG_ACTIVE) == 0) - state = STATE_ACTIVE; else if(strcmp(element_name, TAG_BREAK) == 0) state = STATE_BREAK; + else if(strcmp(element_name, TAG_PROPERTY) == 0) + state = STATE_PROPERTY; else if(strcmp(element_name, TAG_JOINED_LEAGUE) == 0) { state = STATE_JOINED_LEAGUE; @@ -284,9 +284,9 @@ xml_league_read_end_element (GMarkupParseContext *context, strcmp(element_name, TAG_YELLOW_RED) == 0 || strcmp(element_name, TAG_AVERAGE_TALENT) == 0 || strcmp(element_name, TAG_NAMES_FILE) == 0 || - strcmp(element_name, TAG_ACTIVE) == 0 || strcmp(element_name, TAG_BREAK) == 0 || strcmp(element_name, TAG_JOINED_LEAGUE) == 0 || + strcmp(element_name, TAG_PROPERTY) == 0 || strcmp(element_name, TAG_NEW_TABLE) == 0 || strcmp(element_name, TAG_TWO_MATCH_WEEK_START) == 0 || strcmp(element_name, TAG_TWO_MATCH_WEEK_END) == 0 || @@ -366,10 +366,10 @@ xml_league_read_text (GMarkupParseContext *context, (float_value / 10000) * const_float("float_player_max_skill"); else if(state == STATE_NAMES_FILE) misc_string_assign(&new_league.names_file, buf); - else if(state == STATE_ACTIVE) - new_league.active = int_value; else if(state == STATE_BREAK) new_league.rr_break = int_value; + else if(state == STATE_PROPERTY) + g_ptr_array_add(new_league.properties, g_strdup(buf)); else if(state == STATE_JOINED_LEAGUE) misc_string_assign( &g_array_index(new_league.joined_leagues, diff --git a/src/xml_loadsave_cup.c b/src/xml_loadsave_cup.c index 3b34b266..658bf94e 100644 --- a/src/xml_loadsave_cup.c +++ b/src/xml_loadsave_cup.c @@ -39,7 +39,6 @@ enum TAG_CUP = TAG_START_CUP, TAG_CUP_LAST_WEEK, TAG_CUP_ADD_WEEK, - TAG_CUP_PROPERTY, TAG_CUP_GROUP, TAG_CUP_TALENT_DIFF, TAG_CUP_CHOOSE_TEAM, @@ -132,9 +131,9 @@ xml_loadsave_cup_end_element (GMarkupParseContext *context, tag == TAG_ID || tag == TAG_YELLOW_RED || tag == TAG_WEEK_GAP || + tag == TAG_PROPERTY || tag == TAG_CUP_LAST_WEEK || tag == TAG_CUP_ADD_WEEK || - tag == TAG_CUP_PROPERTY || tag == TAG_CUP_GROUP || tag == TAG_CUP_TALENT_DIFF || tag == TAG_CUP_NEXT_FIXTURE_UPDATE_WEEK || @@ -216,12 +215,12 @@ xml_loadsave_cup_text (GMarkupParseContext *context, new_cup->week_gap = int_value; else if(state == TAG_YELLOW_RED) new_cup->yellow_red = int_value; + else if(state == TAG_PROPERTY) + g_ptr_array_add(new_cup->properties, g_strdup(buf)); else if(state == TAG_CUP_LAST_WEEK) new_cup->last_week = int_value; else if(state == TAG_CUP_ADD_WEEK) new_cup->add_week = int_value; - else if(state == TAG_CUP_PROPERTY) - g_ptr_array_add(new_cup->properties, g_strdup(buf)); else if(state == TAG_CUP_GROUP) new_cup->group = int_value; else if(state == TAG_CUP_TALENT_DIFF) @@ -370,7 +369,7 @@ xml_loadsave_cup_write(const gchar *prefix, const Cup *cup) for(i=0;iproperties->len;i++) xml_write_string(fil, (gchar*)g_ptr_array_index(cup->properties, i), - TAG_CUP_PROPERTY, I0); + TAG_PROPERTY, I0); for(i=0;irounds->len;i++) xml_loadsave_cup_write_round(fil, prefix, cup, i); diff --git a/src/xml_loadsave_league.c b/src/xml_loadsave_league.c index 48d299c3..d86de44e 100644 --- a/src/xml_loadsave_league.c +++ b/src/xml_loadsave_league.c @@ -43,7 +43,6 @@ enum TAG_LEAGUE_LAYER, TAG_LEAGUE_FIRST_WEEK, TAG_LEAGUE_ROUND_ROBINS, - TAG_LEAGUE_ACTIVE, TAG_LEAGUE_AVERAGE_TALENT, TAG_LEAGUE_PROM_REL, TAG_LEAGUE_PROM_REL_PROM_GAMES_DEST_SID, @@ -131,7 +130,6 @@ xml_loadsave_league_end_element (GMarkupParseContext *context, if(tag == TAG_LEAGUE_FIRST_WEEK || tag == TAG_LEAGUE_LAYER || - tag == TAG_LEAGUE_ACTIVE || tag == TAG_LEAGUE_BREAK || tag == TAG_LEAGUE_JOINED_LEAGUE_SID || tag == TAG_LEAGUE_JOINED_LEAGUE_RR || @@ -142,6 +140,7 @@ xml_loadsave_league_end_element (GMarkupParseContext *context, tag == TAG_LEAGUE_AVERAGE_TALENT || tag == TAG_LEAGUE_AVERAGE_TALENT || tag == TAG_LEAGUE_ROUND_ROBINS || + tag == TAG_PROPERTY || tag == TAG_NAME || tag == TAG_NAMES_FILE || tag == TAG_SHORT_NAME || @@ -198,6 +197,8 @@ xml_loadsave_league_text (GMarkupParseContext *context, if(state == TAG_NAME) misc_string_assign(&new_league->name, buf); + else if(state == TAG_PROPERTY) + g_ptr_array_add(new_league->properties, g_strdup(buf)); else if(state == TAG_SHORT_NAME) misc_string_assign(&new_league->short_name, buf); else if(state == TAG_NAMES_FILE) @@ -218,8 +219,6 @@ xml_loadsave_league_text (GMarkupParseContext *context, new_league->week_gap = int_value; else if(state == TAG_YELLOW_RED) new_league->yellow_red = int_value; - else if(state == TAG_LEAGUE_ACTIVE) - new_league->active = int_value; else if(state == TAG_LEAGUE_BREAK) new_league->rr_break = int_value; else if(state == TAG_LEAGUE_JOINED_LEAGUE_SID) @@ -338,13 +337,16 @@ xml_loadsave_league_write(const gchar *prefix, const League *league) xml_write_string(fil, league->sid, TAG_SID, I0); xml_write_string(fil, league->symbol, TAG_SYMBOL, I0); + for(i=0;iproperties->len;i++) + xml_write_string(fil, (gchar*)g_ptr_array_index(league->properties, i), + TAG_PROPERTY, I0); + xml_write_int(fil, league->id, TAG_ID, I0); xml_write_int(fil, league->layer, TAG_LEAGUE_LAYER, I0); xml_write_int(fil, league->first_week, TAG_LEAGUE_FIRST_WEEK, I0); xml_write_int(fil, league->round_robins, TAG_LEAGUE_ROUND_ROBINS, I0); xml_write_int(fil, league->week_gap, TAG_WEEK_GAP, I0); xml_write_int(fil, league->yellow_red, TAG_YELLOW_RED, I0); - xml_write_int(fil, league->active, TAG_LEAGUE_ACTIVE, I0); xml_write_int(fil, league->rr_break, TAG_LEAGUE_BREAK, I0); for(i=0;itables->len;i++) diff --git a/support_files/bygfoot.conf b/support_files/bygfoot.conf index 2b384ec4..e28ead8f 100644 --- a/support_files/bygfoot.conf +++ b/support_files/bygfoot.conf @@ -3,7 +3,7 @@ int_opt_confirm_unfit 1 int_opt_save_will_overwrite 0 int_opt_maximize_main_window 1 int_opt_prefer_messages 0 -int_opt_progressbar_pics 1 +int_opt_progressbar_pics 0 int_opt_skip 1 int_opt_autosave 1 int_opt_autosave_interval 5 @@ -19,3 +19,6 @@ string_opt_language_code int_opt_calodds 0 int_opt_load_defs 1 int_opt_randomise_teams 0 +int_opt_calodds 0 +int_opt_load_defs 1 +int_opt_randomise_teams 0 diff --git a/support_files/definitions/euro08/league_euro08_europe_teams.xml b/support_files/definitions/euro08/league_euro08_europe_teams.xml index 739f7e88..3710ecd1 100644 --- a/support_files/definitions/euro08/league_euro08_europe_teams.xml +++ b/support_files/definitions/euro08/league_euro08_europe_teams.xml @@ -6,7 +6,7 @@ Europe flag_eu.png 9000 - 0 + inactive 1 diff --git a/support_files/definitions/fifa/league_afc.xml b/support_files/definitions/fifa/league_afc.xml index 8b44750f..ed6dfa7c 100644 --- a/support_files/definitions/fifa/league_afc.xml +++ b/support_files/definitions/fifa/league_afc.xml @@ -4,7 +4,7 @@ AFC AFC 7000 - 0 + inactive 1 diff --git a/support_files/definitions/fifa/league_caf.xml b/support_files/definitions/fifa/league_caf.xml index a531df4a..bbe3c69e 100644 --- a/support_files/definitions/fifa/league_caf.xml +++ b/support_files/definitions/fifa/league_caf.xml @@ -4,7 +4,7 @@ CAF CAF 7000 - 0 + inactive 1 Togo diff --git a/support_files/definitions/fifa/league_concacaf.xml b/support_files/definitions/fifa/league_concacaf.xml index f0c839eb..fcba4d22 100644 --- a/support_files/definitions/fifa/league_concacaf.xml +++ b/support_files/definitions/fifa/league_concacaf.xml @@ -4,7 +4,7 @@ CONCACAF CONCACAF 7000 - 0 + inactive 1 diff --git a/support_files/definitions/fifa/league_conmebol.xml b/support_files/definitions/fifa/league_conmebol.xml index 7509d011..10ee944b 100644 --- a/support_files/definitions/fifa/league_conmebol.xml +++ b/support_files/definitions/fifa/league_conmebol.xml @@ -4,7 +4,7 @@ CONMEBOL CONMEBOL 9000 - 0 + inactive 1 diff --git a/support_files/definitions/fifa/league_ofc.xml b/support_files/definitions/fifa/league_ofc.xml index f916d51a..bddb5802 100644 --- a/support_files/definitions/fifa/league_ofc.xml +++ b/support_files/definitions/fifa/league_ofc.xml @@ -4,7 +4,7 @@ OFC Oceania 6000 - 0 + inactive 1 diff --git a/support_files/definitions/fifa/league_uefa.xml b/support_files/definitions/fifa/league_uefa.xml index 66142dba..f8598cee 100644 --- a/support_files/definitions/fifa/league_uefa.xml +++ b/support_files/definitions/fifa/league_uefa.xml @@ -7,7 +7,7 @@ flag_eu.png 9000 1 - 0 + inactive diff --git a/support_files/definitions/wc06/league_wc06_africa_teams.xml b/support_files/definitions/wc06/league_wc06_africa_teams.xml index 6ac5681c..361961d6 100644 --- a/support_files/definitions/wc06/league_wc06_africa_teams.xml +++ b/support_files/definitions/wc06/league_wc06_africa_teams.xml @@ -5,7 +5,7 @@ Africa Africa 7000 - 0 + inactive 1 diff --git a/support_files/definitions/wc06/league_wc06_asia_teams.xml b/support_files/definitions/wc06/league_wc06_asia_teams.xml index 54846c89..3aa91924 100644 --- a/support_files/definitions/wc06/league_wc06_asia_teams.xml +++ b/support_files/definitions/wc06/league_wc06_asia_teams.xml @@ -5,7 +5,7 @@ Asia Asia 7000 - 0 + inactive 1 diff --git a/support_files/definitions/wc06/league_wc06_europe_teams.xml b/support_files/definitions/wc06/league_wc06_europe_teams.xml index 3e3d5b57..780badef 100644 --- a/support_files/definitions/wc06/league_wc06_europe_teams.xml +++ b/support_files/definitions/wc06/league_wc06_europe_teams.xml @@ -6,7 +6,7 @@ Europe flag_eu.png 9000 - 0 + inactive 1 diff --git a/support_files/definitions/wc06/league_wc06_ncamerica_teams.xml b/support_files/definitions/wc06/league_wc06_ncamerica_teams.xml index 4818fede..3cc20363 100644 --- a/support_files/definitions/wc06/league_wc06_ncamerica_teams.xml +++ b/support_files/definitions/wc06/league_wc06_ncamerica_teams.xml @@ -4,7 +4,7 @@ N. + C. America NCAmerica 7000 - 0 + inactive 1 diff --git a/support_files/definitions/wc06/league_wc06_oceania_teams.xml b/support_files/definitions/wc06/league_wc06_oceania_teams.xml index 76f04d48..50cfbd25 100644 --- a/support_files/definitions/wc06/league_wc06_oceania_teams.xml +++ b/support_files/definitions/wc06/league_wc06_oceania_teams.xml @@ -4,7 +4,7 @@ Oceania Oceania 6000 - 0 + inactive 1 diff --git a/support_files/definitions/wc06/league_wc06_samerica_teams.xml b/support_files/definitions/wc06/league_wc06_samerica_teams.xml index c6802a92..4ff55b19 100644 --- a/support_files/definitions/wc06/league_wc06_samerica_teams.xml +++ b/support_files/definitions/wc06/league_wc06_samerica_teams.xml @@ -4,7 +4,7 @@ S. America SAmerica 9000 - 0 + inactive 1